Changeset 94918 in webkit
- Timestamp:
- Sep 10, 2011 10:16:09 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r94914 r94918 1 2011-09-10 Sam Weinig <sam@webkit.org> 2 3 Add isInterruptedExecutionException and isTerminatedExecutionException predicates 4 https://bugs.webkit.org/show_bug.cgi?id=67892 5 6 Reviewed by Andy "First Time Reviewer" Estes. 7 8 * JavaScriptCore.exp: 9 Add symbols. 10 11 * interpreter/Interpreter.cpp: 12 (JSC::Interpreter::throwException): 13 Use new predicates. 14 15 * runtime/ExceptionHelpers.cpp: 16 (JSC::createInterruptedExecutionException): 17 (JSC::isInterruptedExecutionException): 18 (JSC::createTerminatedExecutionException): 19 (JSC::isTerminatedExecutionException): 20 * runtime/ExceptionHelpers.h: 21 (JSC::InterruptedExecutionError::InterruptedExecutionError): 22 Add predicates. 23 1 24 2011-09-10 Filip Pizlo <fpizlo@apple.com> 2 25 -
trunk/Source/JavaScriptCore/JavaScriptCore.exp
r94875 r94918 220 220 __ZN3JSC22globalMemoryStatisticsEv 221 221 __ZN3JSC22objectConstructorTableE 222 __ZN3JSC23AbstractSamplingCounter30s_abstractSamplingCounterChainE 222 223 __ZN3JSC23AbstractSamplingCounter4dumpEv 223 __ZN3JSC23AbstractSamplingCounter30s_abstractSamplingCounterChainE224 224 __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateE 225 225 __ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE … … 228 228 __ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE 229 229 __ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE 230 __ZN3JSC30isTerminatedExecutionExceptionENS_7JSValueE 230 231 __ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE 231 232 __ZN3JSC41constructFunctionSkippingEvalEnabledCheckEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r94875 r94918 19 19 ??0SHA1@WTF@@QAE@XZ 20 20 ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z 21 ??0Structure@JSC@@AAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z21 ??0Structure@JSC@@AAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z 22 22 ??0ThreadCondition@WTF@@QAE@XZ 23 23 ??0UString@JSC@@QAE@PBD@Z … … 241 241 ?isMainThread@WTF@@YA_NXZ 242 242 ?isReachableFromOpaqueRoots@WeakHandleOwner@JSC@@UAE_NV?$Handle@W4Unknown@JSC@@@2@PAXAAVSlotVisitor@2@@Z 243 ?isTerminatedExecutionException@JSC@@YA_NVJSValue@1@@Z 243 244 ?isValidAllocation@Heap@JSC@@AAE_NI@Z 244 245 ?isValidCallee@JSValue@JSC@@QAE_NXZ -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r94811 r94918 709 709 } 710 710 711 isInterrupt = (exception->inherits(&InterruptedExecutionError::s_info) || exception->inherits(&TerminatedExecutionError::s_info));711 isInterrupt = isInterruptedExecutionException(exception) || isTerminatedExecutionException(exception); 712 712 } 713 713 -
trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
r94835 r94918 49 49 } 50 50 51 JSObject* createInterruptedExecutionException(JSGlobalData* globalData) 52 { 53 return InterruptedExecutionError::create(*globalData); 54 } 55 56 bool isInterruptedExecutionException(JSObject* object) 57 { 58 return object->inherits(&InterruptedExecutionError::s_info); 59 } 60 61 bool isInterruptedExecutionException(JSValue value) 62 { 63 return value.inherits(&InterruptedExecutionError::s_info); 64 } 65 66 51 67 const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", &Base::s_info, 0, 0 }; 52 68 … … 56 72 } 57 73 58 59 JSObject* createInterruptedExecutionException(JSGlobalData* globalData)60 {61 return InterruptedExecutionError::create(*globalData);62 }63 64 74 JSObject* createTerminatedExecutionException(JSGlobalData* globalData) 65 75 { 66 76 return TerminatedExecutionError::create(*globalData); 67 77 } 78 79 bool isTerminatedExecutionException(JSObject* object) 80 { 81 return object->inherits(&TerminatedExecutionError::s_info); 82 } 83 84 bool isTerminatedExecutionException(JSValue value) 85 { 86 return value.inherits(&TerminatedExecutionError::s_info); 87 } 88 68 89 69 90 JSObject* createStackOverflowError(ExecState* exec) -
trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.h
r94811 r94918 35 35 36 36 JSObject* createInterruptedExecutionException(JSGlobalData*); 37 bool isInterruptedExecutionException(JSObject*); 38 bool isInterruptedExecutionException(JSValue); 39 37 40 JSObject* createTerminatedExecutionException(JSGlobalData*); 41 bool isTerminatedExecutionException(JSObject*); 42 bool isTerminatedExecutionException(JSValue); 43 38 44 JSObject* createStackOverflowError(ExecState*); 39 45 JSObject* createStackOverflowError(JSGlobalObject*); -
trunk/Source/WebCore/ChangeLog
r94916 r94918 1 2011-09-10 Sam Weinig <sam@webkit.org> 2 3 Add isInterruptedExecutionException and isTerminatedExecutionException predicates 4 https://bugs.webkit.org/show_bug.cgi?id=67892 5 6 Reviewed by Andy "First Time Reviewer" Estes. 7 8 * bindings/js/JSDOMBinding.cpp: 9 (WebCore::reportException): 10 * bindings/js/JSEventListener.cpp: 11 (WebCore::JSEventListener::handleEvent): 12 * bindings/js/WorkerScriptController.cpp: 13 (WebCore::WorkerScriptController::evaluate): 14 Use the new predicates instead of probing the ClassInfo directly. 15 1 16 2011-09-10 Kevin Ollivier <kevino@theolliviers.com> 2 17 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r94811 r94918 172 172 void reportException(ExecState* exec, JSValue exception) 173 173 { 174 if ( exception.inherits(&TerminatedExecutionError::s_info))174 if (isTerminatedExecutionException(exception)) 175 175 return; 176 176 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r94811 r94918 135 135 #if ENABLE(WORKERS) 136 136 if (scriptExecutionContext->isWorkerContext()) { 137 bool terminatorCausedException = (exec->hadException() && exec->exception().inherits(&TerminatedExecutionError::s_info));137 bool terminatorCausedException = (exec->hadException() && isTerminatedExecutionException(exec->exception())); 138 138 if (terminatorCausedException || globalData.terminator.shouldTerminate()) 139 139 static_cast<WorkerContext*>(scriptExecutionContext)->script()->forbidExecution(); -
trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp
r94811 r94918 133 133 ExecState* exec = m_workerContextWrapper->globalExec(); 134 134 135 m_workerContextWrapper->globalData().timeoutChecker.start(); 136 135 137 JSValue evaluationException; 138 JSValue returnValue = JSC::evaluate(exec, exec->dynamicGlobalObject()->globalScopeChain(), sourceCode.jsSourceCode(), m_workerContextWrapper.get(), &evaluationException); 136 139 137 m_workerContextWrapper->globalData().timeoutChecker.start();138 JSValue returnValue = JSC::evaluate(exec, exec->dynamicGlobalObject()->globalScopeChain(), sourceCode.jsSourceCode(), m_workerContextWrapper.get(), &evaluationException);139 140 m_workerContextWrapper->globalData().timeoutChecker.stop(); 140 141 141 if ((evaluationException && evaluationException.inherits(&TerminatedExecutionError::s_info)) || m_workerContextWrapper->globalData().terminator.shouldTerminate()) {142 if ((evaluationException && isTerminatedExecutionException(evaluationException)) || m_workerContextWrapper->globalData().terminator.shouldTerminate()) { 142 143 forbidExecution(); 143 144 return ScriptValue();
Note: See TracChangeset
for help on using the changeset viewer.