Changeset 153823 in webkit
- Timestamp:
- Aug 8, 2013, 9:38:31 AM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r153819 r153823 1 2013-08-08 Mark Lam <mark.lam@apple.com> 2 3 Moved ErrorConstructor and NativeErrorConstructor helper functions into 4 the Interpreter class. 5 https://bugs.webkit.org/show_bug.cgi?id=119576. 6 7 Reviewed by Oliver Hunt. 8 9 This change is needed to prepare for making Interpreter::getStackTrace() 10 private. It does not change the behavior of the code, only the lexical 11 scoping. 12 13 * interpreter/Interpreter.h: 14 - Added helper functions for ErrorConstructor and NativeErrorConstructor. 15 * runtime/ErrorConstructor.cpp: 16 (JSC::Interpreter::constructWithErrorConstructor): 17 (JSC::ErrorConstructor::getConstructData): 18 (JSC::Interpreter::callErrorConstructor): 19 (JSC::ErrorConstructor::getCallData): 20 - Don't want ErrorConstructor to call Interpreter::getStackTrace() 21 directly. So, we moved the helper functions into the Interpreter 22 class. 23 * runtime/NativeErrorConstructor.cpp: 24 (JSC::Interpreter::constructWithNativeErrorConstructor): 25 (JSC::NativeErrorConstructor::getConstructData): 26 (JSC::Interpreter::callNativeErrorConstructor): 27 (JSC::NativeErrorConstructor::getCallData): 28 - Don't want NativeErrorConstructor to call Interpreter::getStackTrace() 29 directly. So, we moved the helper functions into the Interpreter 30 class. 31 1 32 2013-08-07 Mark Hahnenberg <mhahnenberg@apple.com> 2 33 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r153457 r153823 223 223 JSString* stackTraceAsString(ExecState*, Vector<StackFrame>); 224 224 225 static EncodedJSValue JSC_HOST_CALL constructWithErrorConstructor(ExecState*); 226 static EncodedJSValue JSC_HOST_CALL callErrorConstructor(ExecState*); 227 static EncodedJSValue JSC_HOST_CALL constructWithNativeErrorConstructor(ExecState*); 228 static EncodedJSValue JSC_HOST_CALL callNativeErrorConstructor(ExecState*); 229 225 230 void dumpSampleData(ExecState* exec); 226 231 void startSampling(); -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r153457 r153823 49 49 // ECMA 15.9.3 50 50 51 static EncodedJSValue JSC_HOST_CALLconstructWithErrorConstructor(ExecState* exec)51 EncodedJSValue JSC_HOST_CALL Interpreter::constructWithErrorConstructor(ExecState* exec) 52 52 { 53 53 JSValue message = exec->argumentCount() ? exec->argument(0) : jsUndefined(); … … 61 61 ConstructType ErrorConstructor::getConstructData(JSCell*, ConstructData& constructData) 62 62 { 63 constructData.native.function = constructWithErrorConstructor;63 constructData.native.function = Interpreter::constructWithErrorConstructor; 64 64 return ConstructTypeHost; 65 65 } 66 66 67 static EncodedJSValue JSC_HOST_CALLcallErrorConstructor(ExecState* exec)67 EncodedJSValue JSC_HOST_CALL Interpreter::callErrorConstructor(ExecState* exec) 68 68 { 69 69 JSValue message = exec->argumentCount() ? exec->argument(0) : jsUndefined(); … … 77 77 CallType ErrorConstructor::getCallData(JSCell*, CallData& callData) 78 78 { 79 callData.native.function = callErrorConstructor;79 callData.native.function = Interpreter::callErrorConstructor; 80 80 return CallTypeHost; 81 81 } -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r153457 r153823 50 50 } 51 51 52 static EncodedJSValue JSC_HOST_CALLconstructWithNativeErrorConstructor(ExecState* exec)52 EncodedJSValue JSC_HOST_CALL Interpreter::constructWithNativeErrorConstructor(ExecState* exec) 53 53 { 54 54 JSValue message = exec->argumentCount() ? exec->argument(0) : jsUndefined(); … … 63 63 ConstructType NativeErrorConstructor::getConstructData(JSCell*, ConstructData& constructData) 64 64 { 65 constructData.native.function = constructWithNativeErrorConstructor;65 constructData.native.function = Interpreter::constructWithNativeErrorConstructor; 66 66 return ConstructTypeHost; 67 67 } 68 68 69 static EncodedJSValue JSC_HOST_CALLcallNativeErrorConstructor(ExecState* exec)69 EncodedJSValue JSC_HOST_CALL Interpreter::callNativeErrorConstructor(ExecState* exec) 70 70 { 71 71 JSValue message = exec->argumentCount() ? exec->argument(0) : jsUndefined(); … … 79 79 CallType NativeErrorConstructor::getCallData(JSCell*, CallData& callData) 80 80 { 81 callData.native.function = callNativeErrorConstructor;81 callData.native.function = Interpreter::callNativeErrorConstructor; 82 82 return CallTypeHost; 83 83 }
Note:
See TracChangeset
for help on using the changeset viewer.