[v8] potentially disposed handle returned for npapi object
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 15:38:57 +0000 (15:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 15:38:57 +0000 (15:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110331

Patch by Dan Carney <dcarney@google.com> on 2013-02-20
Reviewed by Kentaro Hara.

No new tests. No change in functionality.

* bindings/v8/V8NPUtils.cpp:
(WebCore::convertNPVariantToV8Object):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143464 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/V8NPUtils.cpp

index 7583774ccf905fed80c9ecb5efdf8d010a645a78..37e19c75748f50d46c16e42338c93cdda7119617 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-20  Dan Carney  <dcarney@google.com>
+
+        [v8] potentially disposed handle returned for npapi object
+        https://bugs.webkit.org/show_bug.cgi?id=110331
+
+        Reviewed by Kentaro Hara.
+
+        No new tests. No change in functionality.
+
+        * bindings/v8/V8NPUtils.cpp:
+        (WebCore::convertNPVariantToV8Object):
+
 2013-02-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>  and  Martin Robinson  <mrobinson@igalia.com>
 
         [Gtk] HTML5 Media controls require a design refresh
index 93fdc45918ff25bd314b409fc3d0d7a68d137ded..a79d4e49b52652f2aa914292718460b8c2ac17c3 100644 (file)
@@ -98,7 +98,7 @@ v8::Handle<v8::Value> convertNPVariantToV8Object(const NPVariant* variant, NPObj
     case NPVariantType_Object: {
         NPObject* obj = NPVARIANT_TO_OBJECT(*variant);
         if (obj->_class == npScriptObjectClass)
-            return reinterpret_cast<V8NPObject*>(obj)->v8Object;
+            return v8::Local<v8::Value>::New(reinterpret_cast<V8NPObject*>(obj)->v8Object);
         return createV8ObjectForNPObject(obj, npobject);
     }
     default: