Changeset 64145 in webkit
- Timestamp:
- Jul 27, 2010 12:04:50 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r64140 r64145 1 2010-07-27 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Rename NPJSObjectMap to NPRuntimeObjectMap 6 https://bugs.webkit.org/show_bug.cgi?id=43066 7 8 * WebKit2.xcodeproj/project.pbxproj: 9 * WebProcess/Plugins/NPJSObjectMap.cpp: Removed. 10 * WebProcess/Plugins/NPJSObjectMap.h: Removed. 11 * WebProcess/Plugins/NPRuntimeObjectMap.cpp: Added. 12 (WebKit::NPJSObject::NPJSObject): 13 (WebKit::NPJSObject::~NPJSObject): 14 (WebKit::NPJSObject::toNPJSObject): 15 (WebKit::NPJSObject::create): 16 (WebKit::NPJSObject::isNPJSObject): 17 (WebKit::NPJSObject::initialize): 18 (WebKit::identifierFromIdentifierRep): 19 (WebKit::NPJSObject::hasProperty): 20 (WebKit::NPJSObject::getProperty): 21 (WebKit::NPJSObject::npClass): 22 (WebKit::NPJSObject::NP_Allocate): 23 (WebKit::NPJSObject::NP_Deallocate): 24 (WebKit::NPJSObject::NP_HasProperty): 25 (WebKit::NPJSObject::NP_GetProperty): 26 (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap): 27 (WebKit::NPRuntimeObjectMap::getOrCreateNPObject): 28 (WebKit::NPRuntimeObjectMap::invalidate): 29 * WebProcess/Plugins/NPRuntimeObjectMap.h: Added. 30 * WebProcess/Plugins/PluginView.cpp: 31 (WebKit::PluginView::PluginView): 32 (WebKit::PluginView::~PluginView): 33 (WebKit::PluginView::windowScriptNPObject): 34 (WebKit::PluginView::pluginElementNPObject): 35 * WebProcess/Plugins/PluginView.h: 36 * win/WebKit2.vcproj: 37 1 38 2010-07-27 Adam Roben <aroben@apple.com> 2 39 -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r64068 r64145 34 34 1A1C4EC810D06099005E67E7 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C79A100E7FC50078DEBC /* WebCore.framework */; }; 35 35 1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1C648611F415B700553C19 /* WebContextMac.mm */; }; 36 1A2161B011F37664008AD0F5 /* NP JSObjectMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2161AE11F37664008AD0F5 /* NPJSObjectMap.h */; };37 1A2161B111F37664008AD0F5 /* NP JSObjectMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2161AF11F37664008AD0F5 /* NPJSObjectMap.cpp */; };36 1A2161B011F37664008AD0F5 /* NPRuntimeObjectMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2161AE11F37664008AD0F5 /* NPRuntimeObjectMap.h */; }; 37 1A2161B111F37664008AD0F5 /* NPRuntimeObjectMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2161AF11F37664008AD0F5 /* NPRuntimeObjectMap.cpp */; }; 38 38 1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */; }; 39 39 1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */; }; … … 313 313 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; 314 314 1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = "<group>"; }; 315 1A2161AE11F37664008AD0F5 /* NP JSObjectMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPJSObjectMap.h; sourceTree = "<group>"; };316 1A2161AF11F37664008AD0F5 /* NP JSObjectMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPJSObjectMap.cpp; sourceTree = "<group>"; };315 1A2161AE11F37664008AD0F5 /* NPRuntimeObjectMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPRuntimeObjectMap.h; sourceTree = "<group>"; }; 316 1A2161AF11F37664008AD0F5 /* NPRuntimeObjectMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeObjectMap.cpp; sourceTree = "<group>"; }; 317 317 1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeUtilities.cpp; sourceTree = "<group>"; }; 318 318 1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPRuntimeUtilities.h; sourceTree = "<group>"; }; … … 674 674 children = ( 675 675 1A6FB90811E66FB100DB1371 /* Netscape */, 676 1A2161AF11F37664008AD0F5 /* NP JSObjectMap.cpp */,677 1A2161AE11F37664008AD0F5 /* NP JSObjectMap.h */,676 1A2161AF11F37664008AD0F5 /* NPRuntimeObjectMap.cpp */, 677 1A2161AE11F37664008AD0F5 /* NPRuntimeObjectMap.h */, 678 678 1A2162AE11F38971008AD0F5 /* NPRuntimeUtilities.cpp */, 679 679 1A2162AF11F38971008AD0F5 /* NPRuntimeUtilities.h */, … … 1274 1274 BC2E6E8C1141971500A63B1E /* WorkItem.h in Headers */, 1275 1275 BC2E6E8E1141971500A63B1E /* WorkQueue.h in Headers */, 1276 1A2161B011F37664008AD0F5 /* NP JSObjectMap.h in Headers */,1276 1A2161B011F37664008AD0F5 /* NPRuntimeObjectMap.h in Headers */, 1277 1277 1A2162B111F38971008AD0F5 /* NPRuntimeUtilities.h in Headers */, 1278 1278 1A24B5F311F531E800C38269 /* MachUtilities.h in Headers */, … … 1472 1472 BC2E6E8D1141971500A63B1E /* WorkQueue.cpp in Sources */, 1473 1473 BC0092F8115837A300E0AE2A /* WorkQueueMac.cpp in Sources */, 1474 1A2161B111F37664008AD0F5 /* NP JSObjectMap.cpp in Sources */,1474 1A2161B111F37664008AD0F5 /* NPRuntimeObjectMap.cpp in Sources */, 1475 1475 1A2162B011F38971008AD0F5 /* NPRuntimeUtilities.cpp in Sources */, 1476 1476 1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */, -
trunk/WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp
r64144 r64145 24 24 */ 25 25 26 #include "NP JSObjectMap.h"26 #include "NPRuntimeObjectMap.h" 27 27 28 28 #include "NPRuntimeUtilities.h" … … 42 42 class NPJSObject : public NPObject, Noncopyable { 43 43 public: 44 static NPJSObject* create(NP JSObjectMap* objectMap, JSObject* jsObject);44 static NPJSObject* create(NPRuntimeObjectMap* objectMap, JSObject* jsObject); 45 45 46 46 private: … … 65 65 } 66 66 67 void initialize(NP JSObjectMap*, JSObject* jsObject);67 void initialize(NPRuntimeObjectMap*, JSObject* jsObject); 68 68 69 69 bool hasProperty(NPIdentifier); … … 76 76 static bool NP_GetProperty(NPObject* npobj, NPIdentifier name, NPVariant* result); 77 77 78 NP JSObjectMap* m_objectMap;78 NPRuntimeObjectMap* m_objectMap; 79 79 ProtectedPtr<JSObject> m_jsObject; 80 80 }; 81 81 82 NPJSObject* NPJSObject::create(NP JSObjectMap* objectMap, JSObject* jsObject)82 NPJSObject* NPJSObject::create(NPRuntimeObjectMap* objectMap, JSObject* jsObject) 83 83 { 84 84 NPJSObject* npJSObject = toNPJSObject(createNPObject(0, npClass())); … … 93 93 } 94 94 95 void NPJSObject::initialize(NP JSObjectMap* objectMap, JSObject* jsObject)95 void NPJSObject::initialize(NPRuntimeObjectMap* objectMap, JSObject* jsObject) 96 96 { 97 97 ASSERT(!m_objectMap); … … 182 182 } 183 183 184 NP JSObjectMap::NPJSObjectMap(PluginView* pluginView)184 NPRuntimeObjectMap::NPRuntimeObjectMap(PluginView* pluginView) 185 185 : m_pluginView(pluginView) 186 186 { 187 187 } 188 188 189 NPObject* NP JSObjectMap::getOrCreateObject(JSObject* jsObject)189 NPObject* NPRuntimeObjectMap::getOrCreateNPObject(JSObject* jsObject) 190 190 { 191 191 // First, check if we already know about this object. … … 201 201 } 202 202 203 void NP JSObjectMap::invalidate()203 void NPRuntimeObjectMap::invalidate() 204 204 { 205 205 Vector<NPJSObject*> npJSObjects; -
trunk/WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h
r64144 r64145 42 42 // A per plug-in map of NPObjects that wrap JavaScript objects. 43 43 44 class NP JSObjectMap {44 class NPRuntimeObjectMap { 45 45 public: 46 explicit NP JSObjectMap(PluginView*);46 explicit NPRuntimeObjectMap(PluginView*); 47 47 48 48 // Returns an NPObject that wraps the given JavaScript object. If there is already an NPObject that wraps this JSObject, it will 49 49 // retain it and return it. 50 NPObject* getOrCreate Object(JSC::JSObject*);50 NPObject* getOrCreateNPObject(JSC::JSObject*); 51 51 52 52 void invalidate(); -
trunk/WebKit2/WebProcess/Plugins/PluginView.cpp
r64073 r64145 216 216 , m_isWaitingUntilMediaCanStart(false) 217 217 , m_pendingURLRequestsTimer(RunLoop::main(), this, &PluginView::pendingURLRequestsTimerFired) 218 , m_np JSObjectMap(this)218 , m_npRuntimeObjectMap(this) 219 219 { 220 220 } … … 233 233 m_plugin->destroy(); 234 234 235 // Invalidate the NPObject map.236 m_np JSObjectMap.invalidate();235 // Invalidate the object map. 236 m_npRuntimeObjectMap.invalidate(); 237 237 238 238 // Cancel all streams. … … 607 607 ASSERT(frame()->script()->canExecuteScripts(NotAboutToExecuteScript)); 608 608 609 return m_np JSObjectMap.getOrCreateObject(frame()->script()->windowShell(pluginWorld())->window());609 return m_npRuntimeObjectMap.getOrCreateNPObject(frame()->script()->windowShell(pluginWorld())->window()); 610 610 } 611 611 … … 619 619 ASSERT(object); 620 620 621 return m_np JSObjectMap.getOrCreateObject(object);621 return m_npRuntimeObjectMap.getOrCreateNPObject(object); 622 622 } 623 623 -
trunk/WebKit2/WebProcess/Plugins/PluginView.h
r64073 r64145 27 27 #define PluginView_h 28 28 29 #include "NP JSObjectMap.h"29 #include "NPRuntimeObjectMap.h" 30 30 #include "Plugin.h" 31 31 #include "PluginController.h" … … 124 124 HashMap<uint64_t, RefPtr<Stream> > m_streams; 125 125 126 // NPObjects wrapping JavaScript objects.127 NP JSObjectMap m_npJSObjectMap;126 // A map of all related NPObjects for this plug-in view. 127 NPRuntimeObjectMap m_npRuntimeObjectMap; 128 128 }; 129 129 -
trunk/WebKit2/win/WebKit2.vcproj
r64068 r64145 753 753 > 754 754 <File 755 RelativePath="..\WebProcess\Plugins\NP JSObjectMap.cpp"756 > 757 </File> 758 <File 759 RelativePath="..\WebProcess\Plugins\NP JSObjectMap.h"755 RelativePath="..\WebProcess\Plugins\NPRuntimeObjectMap.cpp" 756 > 757 </File> 758 <File 759 RelativePath="..\WebProcess\Plugins\NPRuntimeObjectMap.h" 760 760 > 761 761 </File>
Note: See TracChangeset
for help on using the changeset viewer.