Changeset 96836 in webkit
- Timestamp:
- Oct 6, 2011, 11:17:07 AM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r96673 r96836 80 80 ASSERT(Parent::inherits(&s_info)); 81 81 ASSERT(Parent::isGlobalObject()); 82 Base::finishCreation(globalData , this);82 Base::finishCreation(globalData); 83 83 init(static_cast<JSGlobalObject*>(this)->globalExec()); 84 84 } -
trunk/Source/JavaScriptCore/ChangeLog
r96831 r96836 1 2011-10-05 Gavin Barraclough <[email protected]> 2 3 Add explicit JSGlobalThis type. 4 https://bugs.webkit.org/show_bug.cgi?id=69478 5 6 Reviewed by Darin Adler. 7 8 JSC supports a split global object, as used by WebCore for the Window. As a stage 9 of making this visible to JSC, make it so that if the global this value is not the 10 global object itself, it must be a subclass of JSGlobalThis. 11 12 * API/JSCallbackObjectFunctions.h: 13 (JSC::::finishCreation): 14 - Don't pass the thisValue to JSGlobalObject::finishCreation. 15 * JavaScriptCore.xcodeproj/project.pbxproj: 16 - Added JSGlobalThis.h 17 * jsc.cpp: 18 (GlobalObject::finishCreation): 19 - Don't pass the thisValue to JSGlobalObject::finishCreation. 20 * runtime/JSGlobalObject.h: 21 (JSC::JSGlobalObject::create): 22 (JSC::JSGlobalObject::finishCreation): 23 - finishCreation takes a JSGlobalThis, or thisValue is implicit. 24 * runtime/JSGlobalThis.h: Added. 25 (JSC::JSGlobalThis::create): 26 (JSC::JSGlobalThis::JSGlobalThis): 27 (JSC::JSGlobalThis::finishCreation): 28 - Thin wrapper on JSNonFinalObject to allow type checking. 29 * testRegExp.cpp: 30 (GlobalObject::finishCreation): 31 - Don't pass the thisValue to JSGlobalObject::finishCreation. 32 1 33 2011-10-06 Mark Hahnenberg <[email protected]> 2 34 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r96563 r96836 284 284 860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E10F3A83C100F84710 /* MacroAssemblerX86_64.h */; }; 285 285 860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E20F3A83C100F84710 /* MacroAssemblerX86Common.h */; }; 286 8604F505143CE1C200B295F5 /* JSGlobalThis.h in Headers */ = {isa = PBXBuildFile; fileRef = 8604F503143CE1C100B295F5 /* JSGlobalThis.h */; settings = {ATTRIBUTES = (Private, ); }; }; 286 287 8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8626BECE11928E3900782FAB /* StringStatics.cpp */; }; 287 288 8627E5EC11F1281900A313B5 /* PageAllocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8627E5EA11F1281900A313B5 /* PageAllocation.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1054 1055 860161E20F3A83C100F84710 /* MacroAssemblerX86Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerX86Common.h; sourceTree = "<group>"; }; 1055 1056 8604F4F2143A6C4400B295F5 /* ChangeLog */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; }; 1057 8604F503143CE1C100B295F5 /* JSGlobalThis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalThis.h; sourceTree = "<group>"; }; 1056 1058 8626BECE11928E3900782FAB /* StringStatics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringStatics.cpp; path = text/StringStatics.cpp; sourceTree = "<group>"; }; 1057 1059 8627E5EA11F1281900A313B5 /* PageAllocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageAllocation.h; sourceTree = "<group>"; }; … … 2124 2126 BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */, 2125 2127 BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */, 2128 8604F503143CE1C100B295F5 /* JSGlobalThis.h */, 2126 2129 65EA4C99092AF9E20093D800 /* JSLock.cpp */, 2127 2130 65EA4C9A092AF9E20093D800 /* JSLock.h */, … … 2874 2877 0FE228ED1436AB2700196C48 /* Heuristics.h in Headers */, 2875 2878 0FFF4BB4143955E900655BC0 /* DFGStructureSet.h in Headers */, 2879 8604F505143CE1C200B295F5 /* JSGlobalThis.h in Headers */, 2876 2880 ); 2877 2881 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/JavaScriptCore/jsc.cpp
r96146 r96836 162 162 void finishCreation(JSGlobalData& globalData, const Vector<UString>& arguments) 163 163 { 164 Base::finishCreation(globalData , this);164 Base::finishCreation(globalData); 165 165 166 166 addFunction(globalData, "debug", functionDebug, 1); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r96760 r96836 25 25 #include "JSArray.h" 26 26 #include "JSGlobalData.h" 27 #include "JSGlobalThis.h" 27 28 #include "JSVariableObject.h" 28 29 #include "JSWeakObjectMapRefInternal.h" … … 144 145 { 145 146 JSGlobalObject* globalObject = new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure); 146 globalObject->finishCreation(globalData , globalObject);147 globalObject->finishCreation(globalData); 147 148 return globalObject; 148 149 } … … 160 161 } 161 162 162 void finishCreation(JSGlobalData& globalData, JSObject* thisValue) 163 void finishCreation(JSGlobalData& globalData) 164 { 165 Base::finishCreation(globalData); 166 structure()->setGlobalObject(globalData, this); 167 init(this); 168 } 169 170 void finishCreation(JSGlobalData& globalData, JSGlobalThis* thisValue) 163 171 { 164 172 Base::finishCreation(globalData); -
trunk/Source/JavaScriptCore/testRegExp.cpp
r95901 r96836 125 125 void finishCreation(JSGlobalData& globalData, const Vector<UString>& arguments) 126 126 { 127 Base::finishCreation(globalData , this);127 Base::finishCreation(globalData); 128 128 UNUSED_PARAM(arguments); 129 129 } -
trunk/Source/JavaScriptGlue/ChangeLog
r96465 r96836 1 2011-10-05 Gavin Barraclough <[email protected]> 2 3 Add explicit JSGlobalThis type. 4 https://bugs.webkit.org/show_bug.cgi?id=69478 5 6 Reviewed by Darin Adler. 7 8 JSC supports a split global object, as used by WebCore for the Window. As a stage 9 of making this visible to JSC, make it so that if the global this value is not the 10 global object itself, it must be a subclass of JSGlobalThis. 11 12 * JSRun.h: 13 (JSGlueGlobalObject::create): 14 - Don't pass the thisValue to JSGlobalObject::finishCreation. 15 1 16 2011-10-01 Geoffrey Garen <[email protected]> 2 17 -
trunk/Source/JavaScriptGlue/JSRun.h
r95108 r96836 43 43 Structure* userObjectStructure = UserObjectImp::createStructure(globalData, 0, jsNull()); 44 44 JSGlueGlobalObject* object = new (allocateCell<JSGlueGlobalObject>(globalData.heap)) JSGlueGlobalObject(globalData, structure, userObjectStructure, flags); 45 object->finishCreation(globalData , object);45 object->finishCreation(globalData); 46 46 return object; 47 47 } -
trunk/Source/WebCore/ChangeLog
r96835 r96836 1 2011-10-05 Gavin Barraclough <[email protected]> 2 3 Add explicit JSGlobalThis type. 4 https://bugs.webkit.org/show_bug.cgi?id=69478 5 6 Reviewed by Darin Adler. 7 8 JSC supports a split global object, as used by WebCore for the Window. As a stage 9 of making this visible to JSC, make it so that if the global this value is not the 10 global object itself, it must be a subclass of JSGlobalThis. 11 12 * ForwardingHeaders/runtime/JSGlobalThis.h: Added. 13 - Added forwarding header. 14 * bindings/js/JSDOMGlobalObject.cpp: 15 (WebCore::JSDOMGlobalObject::finishCreation): 16 * bindings/js/JSDOMGlobalObject.h: 17 - finishCreation takes a JSGlobalThis, or thisValue is implicit. 18 * bindings/js/JSDOMWindowShell.h: 19 - Make the window shell a subclass of JSGlobalThis. 20 * bindings/js/JSWorkerContextBase.cpp: 21 (WebCore::JSWorkerContextBase::finishCreation): 22 - Don't pass the thisValue to JSGlobalObject::finishCreation. 23 * bindings/js/JSWorkerContextBase.h: 24 * bindings/scripts/CodeGeneratorJS.pm: 25 (GenerateHeader): 26 - Don't pass the thisValue to JSGlobalObject::finishCreation, 27 for worker contexts. 28 1 29 2011-10-06 Anna Cavender <[email protected]> 2 30 -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
r96346 r96836 54 54 } 55 55 56 void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData, JSObject* thisValue) 56 void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData) 57 { 58 Base::finishCreation(globalData); 59 ASSERT(inherits(&s_info)); 60 } 61 62 void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData, JSGlobalThis* thisValue) 57 63 { 58 64 Base::finishCreation(globalData, thisValue); -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h
r96346 r96836 29 29 30 30 #include <runtime/JSGlobalObject.h> 31 #include <runtime/JSGlobalThis.h> 31 32 32 33 namespace WebCore { … … 49 50 JSDOMGlobalObject(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<DOMWrapperWorld>); 50 51 virtual ~JSDOMGlobalObject(); 51 void finishCreation(JSC::JSGlobalData&, JSC::JSObject* thisValue); 52 void finishCreation(JSC::JSGlobalData&); 53 void finishCreation(JSC::JSGlobalData&, JSC::JSGlobalThis*); 52 54 53 55 public: -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.h
r96346 r96836 31 31 32 32 #include "JSDOMWindow.h" 33 #include <runtime/JSGlobalThis.h> 33 34 34 35 namespace WebCore { … … 37 38 class Frame; 38 39 39 class JSDOMWindowShell : public JSC::JS NonFinalObject{40 typedef JSC::JS NonFinalObjectBase;40 class JSDOMWindowShell : public JSC::JSGlobalThis { 41 typedef JSC::JSGlobalThis Base; 41 42 public: 42 43 JSDOMWindowShell(PassRefPtr<DOMWindow>, JSC::Structure*, DOMWrapperWorld*); -
trunk/Source/WebCore/bindings/js/JSWorkerContextBase.cpp
r95936 r96836 55 55 } 56 56 57 void JSWorkerContextBase::finishCreation(JSGlobalData& globalData , JSWorkerContextBase* thisValue)57 void JSWorkerContextBase::finishCreation(JSGlobalData& globalData) 58 58 { 59 Base::finishCreation(globalData , thisValue);59 Base::finishCreation(globalData); 60 60 ASSERT(inherits(&s_info)); 61 61 } -
trunk/Source/WebCore/bindings/js/JSWorkerContextBase.h
r95108 r96836 56 56 protected: 57 57 JSWorkerContextBase(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<WorkerContext>); 58 void finishCreation(JSC::JSGlobalData& , JSWorkerContextBase*);58 void finishCreation(JSC::JSGlobalData&); 59 59 60 60 private: -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r96788 r96836 739 739 push(@headerContent, " {\n"); 740 740 push(@headerContent, " $className* ptr = new (JSC::allocateCell<$className>(globalData.heap)) ${className}(globalData, structure, impl);\n"); 741 push(@headerContent, " ptr->finishCreation(globalData , ptr);\n");741 push(@headerContent, " ptr->finishCreation(globalData);\n"); 742 742 push(@headerContent, " return ptr;\n"); 743 743 push(@headerContent, " }\n\n");
Note:
See TracChangeset
for help on using the changeset viewer.