Title: [154335] trunk/Source/WebKit2
Revision
154335
Author
[email protected]
Date
2013-08-20 10:08:07 -0700 (Tue, 20 Aug 2013)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=120053
Remove custom getOwnPropertyDescriptor for JSNPObject

Reviewed by Oliver Hunt.

Think this is the last one!

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
    - Remove custom getOwnPropertyDescriptor implementation.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (154334 => 154335)


--- trunk/Source/WebKit2/ChangeLog	2013-08-20 17:07:02 UTC (rev 154334)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-20 17:08:07 UTC (rev 154335)
@@ -1,3 +1,15 @@
+2013-08-20  Gavin Barraclough  <[email protected]>
+
+        https://bugs.webkit.org/show_bug.cgi?id=120053
+        Remove custom getOwnPropertyDescriptor for JSNPObject
+
+        Reviewed by Oliver Hunt.
+
+        Think this is the last one!
+
+        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
+            - Remove custom getOwnPropertyDescriptor implementation.
+
 2013-08-20  Anton Obzhirov  <[email protected]>
 
         <https://webkit.org/b/119487> [Gtk] Cancel authentication on load failed

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp (154334 => 154335)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp	2013-08-20 17:07:02 UTC (rev 154334)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp	2013-08-20 17:08:07 UTC (rev 154335)
@@ -289,41 +289,8 @@
     return false;
 }
 
-bool JSNPObject::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
-{
-    JSNPObject* thisObject = jsCast<JSNPObject*>(object);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-    if (!thisObject->m_npObject) {
-        throwInvalidAccessError(exec);
-        return false;
-    }
+GET_OWN_PROPERTY_DESCRIPTOR_IMPL(JSNPObject)
 
-    NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName);
-
-    // Calling NPClass::invoke will call into plug-in code, and there's no telling what the plug-in can do.
-    // (including destroying the plug-in). Because of this, we make sure to keep the plug-in alive until 
-    // the call has finished.
-    NPRuntimeObjectMap::PluginProtector protector(thisObject->m_objectMap);
-
-    // First, check if the NPObject has a property with this name.
-    if (thisObject->m_npObject->_class->hasProperty && thisObject->m_npObject->_class->hasProperty(thisObject->m_npObject, npIdentifier)) {
-        PropertySlot slot(thisObject);
-        slot.setCustom(thisObject, DontDelete, propertyGetter);
-        descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete);
-        return true;
-    }
-
-    // Second, check if the NPObject has a method with this name.
-    if (thisObject->m_npObject->_class->hasMethod && thisObject->m_npObject->_class->hasMethod(thisObject->m_npObject, npIdentifier)) {
-        PropertySlot slot(thisObject);
-        slot.setCustom(thisObject, DontDelete | ReadOnly, methodGetter);
-        descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly);
-        return true;
-    }
-
-    return false;
-}
-
 void JSNPObject::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot&)
 {
     JSNPObject* thisObject = JSC::jsCast<JSNPObject*>(cell);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to