Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/templates/callback_function.cpp |
| diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp b/third_party/WebKit/Source/bindings/templates/callback_function.cpp |
| index d0c68a56e4c0349e5fbcb8933605e1dc465bcdca..f278da56b90f5dde6ed2da641ca4e450f2e2c8c7 100644 |
| --- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp |
| +++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp |
| @@ -29,6 +29,7 @@ bool {{v8_class}}::call({{argument_declarations | join(', ')}}) |
| if (m_callback.isEmpty()) |
| return false; |
| + |
| ScriptState::Scope scope(scriptState); |
| {% for argument in arguments %} |
| @@ -43,8 +44,6 @@ bool {{v8_class}}::call({{argument_declarations | join(', ')}}) |
| v8::Local<v8::Value> v8ReturnValue; |
| v8::TryCatch exceptionCatcher(scriptState->isolate()); |
| - exceptionCatcher.SetVerbose(true); |
|
bashi
2016/09/23 01:47:10
Removed SetVerbose(true) call because the testharn
haraken
2016/09/23 01:50:34
Hmm, this might be problematic.
SetVerbose(true)
bashi
2016/09/23 01:58:32
What's a solution then? Also, why don't we always
|
| - |
| if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate()), scriptState->getExecutionContext(), scriptState->context()->Global(), {{arguments | length}}, argv, scriptState->isolate()).ToLocal(&v8ReturnValue)) |
| { |
| {% if return_value %} |
| @@ -53,6 +52,8 @@ bool {{v8_class}}::call({{argument_declarations | join(', ')}}) |
| {% endif %} |
| return true; |
| } |
| + DCHECK(exceptionCatcher.HasCaught()); |
| + exceptionState.rethrowV8Exception(exceptionCatcher.Exception()); |
| return false; |
| } |