Changeset 64231 in webkit
- Timestamp:
- Jul 28, 2010 2:30:11 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 15 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64228 r64231 1 2010-07-28 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add support for calling NPObject methods 6 https://bugs.webkit.org/show_bug.cgi?id=43145 7 8 * platform/mac-wk2/Skipped: 9 Remove plugins/npruntime/get-int-identifier-special-values.html since it passes now. 10 1 11 2010-07-28 Victor Wang <victorw@chromium.org> 2 12 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r64174 r64231 1414 1414 plugins/npruntime/bindings-test.html 1415 1415 plugins/npruntime/enumerate.html 1416 plugins/npruntime/get-int-identifier-special-values.html1417 1416 plugins/npruntime/get-property-return-value.html 1418 1417 plugins/npruntime/identifier-conversion.html -
trunk/WebCore/ChangeLog
r64230 r64231 1 2010-07-28 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add support for calling NPObject methods 6 https://bugs.webkit.org/show_bug.cgi?id=43145 7 8 * WebCore.exp.in: 9 Export JSHTMLElement::s_info and pluginScriptObject. 10 11 * WebCore.xcodeproj/project.pbxproj: 12 Make JSHTMLElement.h and JSPluginElementFunctions.h private headers. 13 14 * bindings/js/JSPluginElementFunctions.cpp: 15 (WebCore::pluginScriptObject): 16 * bindings/js/JSPluginElementFunctions.h: 17 Make pluginScriptObject a public function. 18 1 19 2010-07-28 James Robinson <jamesr@chromium.org> 2 20 -
trunk/WebCore/WebCore.exp.in
r64208 r64231 286 286 __ZN7WebCore13IdentifierRep3getEPKc 287 287 __ZN7WebCore13IdentifierRep3getEi 288 __ZN7WebCore13JSHTMLElement6s_infoE 288 289 __ZN7WebCore13KeyboardEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowERKNS_6StringEjbbbbb 289 290 __ZN7WebCore13TypingCommand39insertParagraphSeparatorInQuotedContentEPNS_8DocumentE … … 409 410 __ZN7WebCore18deprecatedParseURLERKNS_6StringE 410 411 __ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionE 412 __ZN7WebCore18pluginScriptObjectEPN3JSC9ExecStateEPNS_13JSHTMLElementE 411 413 __ZN7WebCore19AnimationController16resumeAnimationsEPNS_8DocumentE 412 414 __ZN7WebCore19AnimationController17suspendAnimationsEPNS_8DocumentE -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r64196 r64231 353 353 1A3417CA0CECFF250049CBDE /* JSCustomVoidCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3417C80CECFF250049CBDE /* JSCustomVoidCallback.cpp */; }; 354 354 1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */; }; 355 1A494BFB0A122F4400FDAFC1 /* JSHTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */; };355 1A494BFB0A122F4400FDAFC1 /* JSHTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 356 356 1A494E340A12358B00FDAFC1 /* JSHTMLDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494E320A12358A00FDAFC1 /* JSHTMLDocument.cpp */; }; 357 357 1A494E350A12358B00FDAFC1 /* JSHTMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A494E330A12358B00FDAFC1 /* JSHTMLDocument.h */; }; … … 2516 2516 93B70D6A09EB0C7C009D8468 /* JSEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D4E09EB0C7C009D8468 /* JSEventListener.h */; }; 2517 2517 93B70D6B09EB0C7C009D8468 /* JSPluginElementFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D4F09EB0C7C009D8468 /* JSPluginElementFunctions.cpp */; }; 2518 93B70D6C09EB0C7C009D8468 /* JSPluginElementFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */; };2518 93B70D6C09EB0C7C009D8468 /* JSPluginElementFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5009EB0C7C009D8468 /* JSPluginElementFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2519 2519 93B70D6F09EB0C7C009D8468 /* ScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D5309EB0C7C009D8468 /* ScriptController.cpp */; }; 2520 2520 93B70D7009EB0C7C009D8468 /* ScriptController.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5409EB0C7C009D8468 /* ScriptController.h */; settings = {ATTRIBUTES = (Private, ); }; }; -
trunk/WebCore/bindings/js/JSPluginElementFunctions.cpp
r64093 r64231 50 50 } 51 51 52 staticJSObject* pluginScriptObject(ExecState* exec, JSHTMLElement* jsHTMLElement)52 JSObject* pluginScriptObject(ExecState* exec, JSHTMLElement* jsHTMLElement) 53 53 { 54 54 HTMLElement* element = jsHTMLElement->impl(); -
trunk/WebCore/bindings/js/JSPluginElementFunctions.h
r64093 r64231 37 37 // Runtime object support code for JSHTMLAppletElement, JSHTMLEmbedElement and JSHTMLObjectElement. 38 38 JSC::Bindings::Instance* pluginInstance(Node*); 39 JSC::JSObject* pluginScriptObject(JSC::ExecState* exec, JSHTMLElement* jsHTMLElement); 39 40 40 41 JSC::JSValue runtimeObjectPropertyGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); -
trunk/WebKit2/ChangeLog
r64224 r64231 1 2010-07-28 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add support for calling NPObject methods 6 https://bugs.webkit.org/show_bug.cgi?id=43145 7 8 * WebKit2.xcodeproj/project.pbxproj: 9 Add JSNPMethod.cpp and JSNPMethod.h 10 11 * WebProcess/Plugins/JSNPMethod.cpp: Added. 12 * WebProcess/Plugins/JSNPMethod.h: Added. 13 * WebProcess/Plugins/JSNPObject.cpp: 14 (WebKit::): 15 Add a ClassInfo static variable for JSNPObject. 16 17 (WebKit::JSNPObject::callMethod): 18 Convert the passed in arguments, call the method and convert the result back. 19 20 (WebKit::JSNPObject::getOwnPropertySlot): 21 Check if the NPObject has a method. 22 23 (WebKit::JSNPObject::methodGetter): 24 Return a new JSNPMethod. 25 26 * WebProcess/Plugins/JSNPObject.h: 27 (WebKit::JSNPObject::classInfo): 28 Return the s_info. 29 30 * WebProcess/Plugins/NPJSObject.cpp: 31 (WebKit::NPJSObject::getProperty): 32 Get the property from the JSObject. 33 34 * WebProcess/Plugins/NPRuntimeObjectMap.cpp: 35 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): 36 Convert the given JSValue to an NPVariant. 37 38 * win/WebKit2.vcproj: 39 Add JSNPMethod.cpp and JSNPMethod.h 40 1 41 2010-07-28 Adam Roben <aroben@apple.com> 2 42 -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r64167 r64231 76 76 1AE4987811FF7FAA0048B464 /* JSNPObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE4987611FF7FAA0048B464 /* JSNPObject.h */; }; 77 77 1AE4987911FF7FAA0048B464 /* JSNPObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4987711FF7FAA0048B464 /* JSNPObject.cpp */; }; 78 1AE49A4911FFA8CE0048B464 /* JSNPMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE49A4711FFA8CE0048B464 /* JSNPMethod.h */; }; 79 1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE49A4811FFA8CE0048B464 /* JSNPMethod.cpp */; }; 78 80 1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */; }; 79 81 1AEFCC1211D01F96008219D3 /* PluginInfoStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEFCC1011D01F96008219D3 /* PluginInfoStore.h */; }; … … 365 367 1AE4987611FF7FAA0048B464 /* JSNPObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNPObject.h; sourceTree = "<group>"; }; 366 368 1AE4987711FF7FAA0048B464 /* JSNPObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNPObject.cpp; sourceTree = "<group>"; }; 369 1AE49A4711FFA8CE0048B464 /* JSNPMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNPMethod.h; sourceTree = "<group>"; }; 370 1AE49A4811FFA8CE0048B464 /* JSNPMethod.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNPMethod.cpp; sourceTree = "<group>"; }; 367 371 1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetscapePluginMac.mm; sourceTree = "<group>"; }; 368 372 1AEFCC1011D01F96008219D3 /* PluginInfoStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginInfoStore.h; sourceTree = "<group>"; }; … … 682 686 children = ( 683 687 1A6FB90811E66FB100DB1371 /* Netscape */, 688 1AE49A4811FFA8CE0048B464 /* JSNPMethod.cpp */, 689 1AE49A4711FFA8CE0048B464 /* JSNPMethod.h */, 684 690 1AE4987711FF7FAA0048B464 /* JSNPObject.cpp */, 685 691 1AE4987611FF7FAA0048B464 /* JSNPObject.h */, … … 1296 1302 1AE4976811FF658E0048B464 /* NPJSObject.h in Headers */, 1297 1303 1AE4987811FF7FAA0048B464 /* JSNPObject.h in Headers */, 1304 1AE49A4911FFA8CE0048B464 /* JSNPMethod.h in Headers */, 1298 1305 ); 1299 1306 runOnlyForDeploymentPostprocessing = 0; … … 1495 1502 1AE4976911FF658E0048B464 /* NPJSObject.cpp in Sources */, 1496 1503 1AE4987911FF7FAA0048B464 /* JSNPObject.cpp in Sources */, 1504 1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */, 1497 1505 ); 1498 1506 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/Plugins/JSNPMethod.h
r64230 r64231 24 24 */ 25 25 26 #ifndef JSNP Object_h27 #define JSNP Object_h26 #ifndef JSNPMethod_h 27 #define JSNPMethod_h 28 28 29 #include <JavaScriptCore/ JSObjectWithGlobalObject.h>29 #include <JavaScriptCore/InternalFunction.h> 30 30 31 struct NPObject;31 typedef void* NPIdentifier; 32 32 33 33 namespace WebKit { 34 34 35 class NPRuntimeObjectMap; 36 37 // JSNPObject is a JSObject that wraps an NPObject. 35 // A JSObject that wraps an NPMethod. 36 class JSNPMethod : public JSC::InternalFunction { 37 public: 38 JSNPMethod(JSC::ExecState*, JSC::JSGlobalObject*, const JSC::Identifier&, NPIdentifier); 38 39 39 class JSNPObject : public JSC::JSObjectWithGlobalObject { 40 public: 41 JSNPObject(JSC::ExecState*, JSC::JSGlobalObject*, NPRuntimeObjectMap* objectMap, NPObject* npObject); 42 ~JSNPObject(); 40 static const JSC::ClassInfo s_info; 43 41 44 private: 45 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSObject::StructureFlags; 46 42 NPIdentifier npIdentifier() const { return m_npIdentifier; } 43 44 private: 47 45 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) 48 46 { … … 50 48 } 51 49 52 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); 50 virtual JSC::CallType getCallData(JSC::CallData&); 51 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 52 53 NPIdentifier m_npIdentifier; 54 }; 53 55 54 static JSC::JSValue propertyGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);55 static JSC::JSObject* throwInvalidAccessError(JSC::ExecState*);56 57 NPRuntimeObjectMap* m_objectMap;58 NPObject* m_npObject;59 };60 56 61 57 } // namespace WebKit 62 58 63 #endif // JSNP Object_h59 #endif // JSNPMethod_h -
trunk/WebKit2/WebProcess/Plugins/JSNPObject.cpp
r64181 r64231 26 26 #include "JSNPObject.h" 27 27 28 #include "JSNPMethod.h" 28 29 #include "NPRuntimeObjectMap.h" 29 30 #include "NPRuntimeUtilities.h" 30 31 #include <JavaScriptCore/Error.h> 31 32 #include <JavaScriptCore/JSGlobalObject.h> 33 #include <JavaScriptCore/ObjectPrototype.h> 32 34 #include <JavaScriptCore/JSLock.h> 33 #include <JavaScriptCore/ObjectPrototype.h>34 35 #include <WebCore/IdentifierRep.h> 35 36 … … 43 44 return static_cast<NPIdentifier>(IdentifierRep::get(identifier.ascii())); 44 45 } 45 46 47 const ClassInfo JSNPObject::s_info = { "NPObject", 0, 0, 0 }; 48 46 49 JSNPObject::JSNPObject(ExecState*, JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject) 47 50 : JSObjectWithGlobalObject(globalObject, createStructure(globalObject->objectPrototype())) … … 57 60 } 58 61 62 JSValue JSNPObject::callMethod(ExecState* exec, NPIdentifier methodName) 63 { 64 if (!m_npObject->_class->hasMethod(m_npObject, methodName)) 65 return jsUndefined(); 66 67 size_t argumentCount = exec->argumentCount(); 68 Vector<NPVariant, 8> arguments(argumentCount); 69 70 // Convert all arguments to NPVariants. 71 for (size_t i = 0; i < argumentCount; ++i) 72 m_objectMap->convertJSValueToNPVariant(exec, exec->argument(i), arguments[i]); 73 74 bool returnValue; 75 NPVariant result; 76 VOID_TO_NPVARIANT(result); 77 78 { 79 JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); 80 returnValue = m_npObject->_class->invoke(m_npObject, methodName, arguments.data(), argumentCount, &result); 81 82 // FIXME: Handle invoke setting an exception. 83 // FIXME: Find out what happens if calling invoke causes the plug-in to go away. 84 } 85 86 // Release all arguments; 87 for (size_t i = 0; i < argumentCount; ++i) 88 releaseNPVariantValue(&arguments[i]); 89 90 if (!returnValue) 91 throwError(exec, createError(exec, "Error calling method on NPObject.")); 92 93 JSValue propertyValue = m_objectMap->convertNPVariantToJSValue(exec, result); 94 releaseNPVariantValue(&result); 95 return propertyValue; 96 } 97 59 98 bool JSNPObject::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 60 99 { … … 65 104 66 105 NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName); 106 107 // First, check if the NPObject has a property with this name. 67 108 if (m_npObject->_class->hasProperty && m_npObject->_class->hasProperty(m_npObject, npIdentifier)) { 68 109 slot.setCustom(this, propertyGetter); … … 70 111 } 71 112 72 // FIXME: Check methods. 113 // Second, check is the NPObject has a method with this name. 114 if (m_npObject->_class->hasMethod && m_npObject->_class->hasMethod(m_npObject, npIdentifier)) { 115 slot.setCustom(this, methodGetter); 116 return true; 117 } 118 73 119 return false; 74 120 } … … 84 130 return jsUndefined(); 85 131 86 NPVariant property;87 VOID_TO_NPVARIANT( property);132 NPVariant result; 133 VOID_TO_NPVARIANT(result); 88 134 89 bool re sult;135 bool returnValue; 90 136 { 91 137 JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); 92 138 NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName); 93 re sult = thisObj->m_npObject->_class->getProperty(thisObj->m_npObject, npIdentifier, &property);139 returnValue = thisObj->m_npObject->_class->getProperty(thisObj->m_npObject, npIdentifier, &result); 94 140 95 141 // FIXME: Handle getProperty setting an exception. … … 97 143 } 98 144 99 if (!re sult)145 if (!returnValue) 100 146 return jsUndefined(); 101 147 102 return thisObj->m_objectMap->convertNPVariantToValue(exec, property); 148 JSValue propertyValue = thisObj->m_objectMap->convertNPVariantToJSValue(exec, result); 149 releaseNPVariantValue(&result); 150 return propertyValue; 151 } 152 153 JSValue JSNPObject::methodGetter(ExecState* exec, JSValue slotBase, const Identifier& methodName) 154 { 155 JSNPObject* thisObj = static_cast<JSNPObject*>(asObject(slotBase)); 156 157 if (!thisObj->m_npObject) 158 return throwInvalidAccessError(exec); 159 160 NPIdentifier npIdentifier = npIdentifierFromIdentifier(methodName); 161 return new (exec) JSNPMethod(exec, thisObj->globalObject(), methodName, npIdentifier); 103 162 } 104 163 -
trunk/WebKit2/WebProcess/Plugins/JSNPObject.h
r64167 r64231 29 29 #include <JavaScriptCore/JSObjectWithGlobalObject.h> 30 30 31 typedef void* NPIdentifier; 31 32 struct NPObject; 32 33 … … 42 43 ~JSNPObject(); 43 44 45 JSC::JSValue callMethod(JSC::ExecState*, NPIdentifier methodName); 46 47 static const JSC::ClassInfo s_info; 48 44 49 private: 45 50 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSObject::StructureFlags; … … 53 58 54 59 static JSC::JSValue propertyGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 60 static JSC::JSValue methodGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 55 61 static JSC::JSObject* throwInvalidAccessError(JSC::ExecState*); 62 63 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } 56 64 57 65 NPRuntimeObjectMap* m_objectMap; -
trunk/WebKit2/WebProcess/Plugins/NPJSObject.cpp
r64147 r64231 28 28 #include "NPRuntimeObjectMap.h" 29 29 #include "NPRuntimeUtilities.h" 30 #include "NotImplemented.h" 30 31 #include "PluginView.h" 32 #include <JavaScriptCore/JSLock.h> 31 33 #include <JavaScriptCore/JSObject.h> 32 34 #include <WebCore/Frame.h> … … 96 98 97 99 exec->clearException(); 98 99 100 return result; 100 101 } 101 102 102 bool NPJSObject::getProperty(NPIdentifier identifier, NPVariant* result)103 bool NPJSObject::getProperty(NPIdentifier propertyName, NPVariant* result) 103 104 { 104 // FIXME: Implement. 105 return false; 105 IdentifierRep* identifierRep = static_cast<IdentifierRep*>(propertyName); 106 107 ExecState* exec = m_objectMap->globalExec(); 108 if (!exec) 109 return false; 110 111 JSLock lock(SilenceAssertionsOnly); 112 JSValue jsResult; 113 if (identifierRep->isString()) 114 jsResult = m_jsObject->get(exec, identifierFromIdentifierRep(exec, identifierRep)); 115 else 116 jsResult = m_jsObject->get(exec, identifierRep->number()); 117 118 m_objectMap->convertJSValueToNPVariant(exec, jsResult, *result); 119 exec->clearException(); 120 return true; 106 121 } 107 122 -
trunk/WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp
r64174 r64231 25 25 26 26 #include "NPRuntimeObjectMap.h" 27 28 #include <JavaScriptCore/JSLock.h> 27 29 28 30 #include "JSNPObject.h" … … 76 78 } 77 79 78 JSValue NPRuntimeObjectMap::convertNPVariantTo Value(JSC::ExecState* exec, const NPVariant& variant)80 JSValue NPRuntimeObjectMap::convertNPVariantToJSValue(JSC::ExecState* exec, const NPVariant& variant) 79 81 { 80 82 switch (variant.type) { … … 106 108 } 107 109 110 void NPRuntimeObjectMap::convertJSValueToNPVariant(ExecState* exec, JSValue value, NPVariant& variant) 111 { 112 JSLock lock(SilenceAssertionsOnly); 113 114 VOID_TO_NPVARIANT(variant); 115 116 if (value.isNull()) { 117 NULL_TO_NPVARIANT(variant); 118 return; 119 } 120 121 if (value.isUndefined()) { 122 VOID_TO_NPVARIANT(variant); 123 return; 124 } 125 126 if (value.isBoolean()) { 127 BOOLEAN_TO_NPVARIANT(value.toBoolean(exec), variant); 128 return; 129 } 130 131 if (value.isNumber()) { 132 DOUBLE_TO_NPVARIANT(value.toNumber(exec), variant); 133 return; 134 } 135 136 if (value.isString()) { 137 CString utf8String = value.toString(exec).UTF8String(); 138 139 // This should use NPN_MemAlloc, but we know that it uses malloc under the hood. 140 char* utf8Characters = static_cast<char*>(malloc(utf8String.length())); 141 memcpy(utf8Characters, utf8String.data(), utf8String.length()); 142 143 STRINGN_TO_NPVARIANT(utf8Characters, utf8String.length(), variant); 144 return; 145 } 146 147 if (value.isObject()) { 148 JSObject* jsObject = asObject(value); 149 150 if (jsObject->classInfo() == &JSNPObject::s_info) { 151 notImplemented(); 152 return; 153 } 154 155 NPObject* npObject = getOrCreateNPObject(jsObject); 156 OBJECT_TO_NPVARIANT(npObject, variant); 157 return; 158 } 159 160 ASSERT_NOT_REACHED(); 161 } 162 108 163 void NPRuntimeObjectMap::invalidate() 109 164 { -
trunk/WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h
r64174 r64231 61 61 void jsNPObjectDestroyed(JSNPObject*); 62 62 63 JSC::JSValue convertNPVariantToValue(JSC::ExecState*, const NPVariant&); 63 void convertJSValueToNPVariant(JSC::ExecState*, JSC::JSValue, NPVariant&); 64 JSC::JSValue convertNPVariantToJSValue(JSC::ExecState*, const NPVariant&); 64 65 65 66 // Called when the plug-in is destroyed. Will invalidate all the NPObjects. -
trunk/WebKit2/win/WebKit2.vcproj
r64167 r64231 753 753 > 754 754 <File 755 RelativePath="..\WebProcess\Plugins\JSNPMethod.cpp" 756 > 757 </File> 758 <File 759 RelativePath="..\WebProcess\Plugins\JSNPMethod.h" 760 > 761 </File> 762 <File 755 763 RelativePath="..\WebProcess\Plugins\JSNPObject.cpp" 756 764 >
Note: See TracChangeset
for help on using the changeset viewer.