Changeset 138003 in webkit
- Timestamp:
- Dec 18, 2012 2:47:41 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r138002 r138003 1 2012-12-17 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: MediaQueryList listener silently catches errors 4 https://bugs.webkit.org/show_bug.cgi?id=105162 5 6 Reviewed by Alexander Pavlov. 7 8 Test that uncaught exception in MediaQueryListListener will be logged to the console. 9 10 * http/tests/inspector-protocol/resources/protocol-test.js: 11 (runTest): 12 * inspector-protocol/media-query-listener-exception-expected.txt: Added. 13 * inspector-protocol/media-query-listener-exception.html: Added. 14 1 15 2012-12-18 Dominik Röttsches <dominik.rottsches@intel.com> 2 16 -
trunk/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js
r129595 r138003 64 64 function runTest() 65 65 { 66 if (!window.testRunner) { 67 console.error("This test requires DumpRenderTree"); 68 return; 69 } 66 70 testRunner.dumpAsText(); 67 71 testRunner.waitUntilDone(); -
trunk/Source/WebCore/ChangeLog
r138000 r138003 1 2012-12-17 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: MediaQueryList listener silently catches errors 4 https://bugs.webkit.org/show_bug.cgi?id=105162 5 6 Reviewed by Alexander Pavlov. 7 8 Drive-by: removed unused ScriptCallback::call(bool). 9 10 Test: inspector-protocol/media-query-listener-exception.html 11 12 * bindings/js/ScriptFunctionCall.cpp: 13 (WebCore::ScriptCallback::call): 14 * bindings/js/ScriptFunctionCall.h: 15 (ScriptCallback): 16 * bindings/v8/ScriptFunctionCall.cpp: report uncaught exception to the inspector 17 if it was thrown during the function call. 18 (WebCore::ScriptCallback::call): 19 * bindings/v8/ScriptFunctionCall.h: 20 (ScriptCallback): 21 1 22 2012-12-18 Eugene Klyuchnikov <eustas@chromium.org> 2 23 -
trunk/Source/WebCore/bindings/js/ScriptFunctionCall.cpp
r129476 r138003 199 199 ScriptValue ScriptCallback::call() 200 200 { 201 bool hadException;202 return call(hadException);203 }204 205 ScriptValue ScriptCallback::call(bool& hadException)206 {207 201 JSLockHolder lock(m_exec); 208 202 … … 213 207 214 208 JSValue result = JSC::call(m_exec, m_function.jsValue(), callType, callData, m_function.jsValue(), m_arguments); 215 hadException = m_exec->hadException();209 bool hadException = m_exec->hadException(); 216 210 217 211 if (hadException) { -
trunk/Source/WebCore/bindings/js/ScriptFunctionCall.h
r127191 r138003 89 89 90 90 ScriptValue call(); 91 ScriptValue call(bool& hadException);92 91 93 92 private: -
trunk/Source/WebCore/bindings/v8/ScriptFunctionCall.cpp
r136822 r138003 186 186 ScriptValue ScriptCallback::call() 187 187 { 188 bool hadException = false;189 return call(hadException);190 }191 192 ScriptValue ScriptCallback::call(bool& hadException)193 {194 188 ASSERT(v8::Context::InContext()); 195 189 ASSERT(m_function.v8Value()->IsFunction()); 196 190 197 191 v8::TryCatch exceptionCatcher; 192 exceptionCatcher.SetVerbose(true); 198 193 v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global(); 199 194 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(m_function.v8Value()); … … 204 199 205 200 v8::Handle<v8::Value> result = ScriptController::callFunctionWithInstrumentation(0, function, object, m_arguments.size(), args.get()); 206 207 if (exceptionCatcher.HasCaught()) {208 hadException = true;209 m_scriptState->setException(exceptionCatcher.Exception());210 return ScriptValue();211 }212 213 201 return ScriptValue(result); 214 202 } -
trunk/Source/WebCore/bindings/v8/ScriptFunctionCall.h
r127757 r138003 78 78 79 79 ScriptValue call(); 80 ScriptValue call(bool& hadException);81 80 82 81 private:
Note: See TracChangeset
for help on using the changeset viewer.