gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-150-g80dc36a
Date: Mon, 28 Feb 2011 19:25:46 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  80dc36abd95f98029825b7995d6a93145b8ca6cb (commit)
       via  5508ebe615ccebdeca7b7eda4ee9e0c8abe24aad (commit)
       via  4c331e1733a646983186bb9844dedd6420db7ef4 (commit)
      from  03c23e922d99daff6df9a2f8dd4f86b57e494b4c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=80dc36abd95f98029825b7995d6a93145b8ca6cb


commit 80dc36abd95f98029825b7995d6a93145b8ca6cb
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 28 20:16:02 2011 +0100

    Ensure that createTextField does not crash.

diff --git a/libcore/asobj/TextField_as.cpp b/libcore/asobj/TextField_as.cpp
index a1e7ac6..2187945 100644
--- a/libcore/asobj/TextField_as.cpp
+++ b/libcore/asobj/TextField_as.cpp
@@ -254,6 +254,8 @@ textfield_createTextField(const fn_call& fn)
     //  2. Make that object into a TextField and put it on the display list.
     as_object* obj = createTextFieldObject(getGlobal(fn));
 
+    if (!obj) return as_value();
+
     DisplayObject* tf = new TextField(obj, ptr, bounds);
 
     VM& vm = getVM(fn);

http://git.savannah.gnu.org/cgit//commit/?id=5508ebe615ccebdeca7b7eda4ee9e0c8abe24aad


commit 5508ebe615ccebdeca7b7eda4ee9e0c8abe24aad
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 28 20:15:29 2011 +0100

    Ensure that a valid TextField is constructed

diff --git a/libcore/swf/DefineEditTextTag.cpp 
b/libcore/swf/DefineEditTextTag.cpp
index 4a02257..423bfc5 100644
--- a/libcore/swf/DefineEditTextTag.cpp
+++ b/libcore/swf/DefineEditTextTag.cpp
@@ -50,6 +50,19 @@ DefineEditTextTag::createDisplayObject(Global_as& gl, 
DisplayObject* parent)
        // Resolve the font, if possible
        getFont();
     as_object* obj = createTextFieldObject(gl);
+
+    // If the TextField class is not present, the construction of a TextField
+    // object will fail.
+    // TODO: check what happens in this case (when the TextField class is
+    // removed before this tag is processed).
+    if (!obj) {
+        // Note that it is expected that createDisplayObject() always returns
+        // a DisplayObject and not null.
+        log_error("Failed to construct a TextField object; using"
+                "a substitute object");
+        obj = new as_object(gl);
+    }
+
        TextField* ch = new TextField(obj, parent, *this);
 
        return ch;

http://git.savannah.gnu.org/cgit//commit/?id=4c331e1733a646983186bb9844dedd6420db7ef4


commit 4c331e1733a646983186bb9844dedd6420db7ef4
Author: Benjamin Wolsey <address@hidden>
Date:   Mon Feb 28 20:04:02 2011 +0100

    Assert that an associated object exists

diff --git a/libcore/TextField.cpp b/libcore/TextField.cpp
index 5177bbd..9c99acf 100644
--- a/libcore/TextField.cpp
+++ b/libcore/TextField.cpp
@@ -122,7 +122,6 @@ TextField::TextField(as_object* object, DisplayObject* 
parent,
     _html(def.html()),
     _selectable(!def.noSelect())
 {
-
     assert(object);
 
     // WARNING! remember to set the font *before* setting text value!
@@ -190,6 +189,7 @@ TextField::TextField(as_object* object, DisplayObject* 
parent,
     _html(false),
     _selectable(true)
 {
+    assert(object);
     // Use the default font (Times New Roman for Windows, Times for Mac
     // according to docs. They don't say what it is for Linux.
     boost::intrusive_ptr<const Font> f = fontlib::get_default_font(); 

-----------------------------------------------------------------------

Summary of changes:
 libcore/TextField.cpp             |    2 +-
 libcore/asobj/TextField_as.cpp    |    2 ++
 libcore/swf/DefineEditTextTag.cpp |   13 +++++++++++++
 3 files changed, 16 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]