Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp |
| index a7454d9c442f79547d144bdb5fc9eababf83550d..dada31a49c665e806c6ff7ec826b636c70953605 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp |
| @@ -89,9 +89,6 @@ v8::Local<v8::Value> V8ErrorHandler::callListenerFunction(ScriptState* scriptSta |
| void V8ErrorHandler::storeExceptionOnErrorEventWrapper(ScriptState* scriptState, ErrorEvent* event, v8::Local<v8::Value> data, v8::Local<v8::Object> creationContext) |
| { |
| v8::Local<v8::Value> wrappedEvent = toV8(event, creationContext, scriptState->isolate()); |
| - if (wrappedEvent.IsEmpty()) |
| - return; |
| - |
| DCHECK(wrappedEvent->IsObject()); |
| auto privateError = V8PrivateProperty::getErrorEventError(scriptState->isolate()); |
| privateError.set(scriptState->context(), wrappedEvent.As<v8::Object>(), data); |
| @@ -101,9 +98,8 @@ void V8ErrorHandler::storeExceptionOnErrorEventWrapper(ScriptState* scriptState, |
| v8::Local<v8::Value> V8ErrorHandler::loadExceptionFromErrorEventWrapper(ScriptState* scriptState, ErrorEvent* event, v8::Local<v8::Object> creationContext) |
| { |
| v8::Local<v8::Value> wrappedEvent = toV8(event, creationContext, scriptState->isolate()); |
| - if (wrappedEvent.IsEmpty() || !wrappedEvent->IsObject()) |
| + if (!wrappedEvent->IsObject()) |
|
Yuki
2016/08/24 12:02:08
Unless |event| is not nullptr, toV8() must always
|
| return v8::Local<v8::Value>(); |
| - |
| DCHECK(wrappedEvent->IsObject()); |
|
Yuki
2016/08/24 12:02:08
nit: Maybe we no longer need this DCHECK.
|
| auto privateError = V8PrivateProperty::getErrorEventError(scriptState->isolate()); |
| v8::Local<v8::Value> error = privateError.getOrUndefined(scriptState->context(), wrappedEvent.As<v8::Object>()); |