Chromium Code Reviews| Index: extensions/renderer/module_system.cc |
| diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc |
| index 4665d753f37c579d09e2afa60f64d4df60bb2d1c..e7b72fc7906499793363a9a5a209d06658f147ca 100644 |
| --- a/extensions/renderer/module_system.cc |
| +++ b/extensions/renderer/module_system.cc |
| @@ -457,7 +457,9 @@ void ModuleSystem::LazyFieldGetterInner( |
| v8::Local<v8::Value> val = info.This(); |
| if (val->IsObject()) { |
| v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(val); |
| - object->Delete(context, property); |
| + if (object->Delete(context, property).IsNothing()) { |
| + NOTREACHED(); |
| + } |
| SetProperty(context, object, property, new_field); |
| } else { |
| NOTREACHED(); |
| @@ -577,8 +579,10 @@ void ModuleSystem::RequireAsync( |
| gin::ModuleRegistry::From(v8_context); |
| if (!module_registry) { |
| Warn(GetIsolate(), "Extension view no longer exists"); |
| - resolver->Reject(v8_context, v8::Exception::Error(ToV8StringUnsafe( |
| - GetIsolate(), "Extension view no longer exists"))); |
| + if (resolver->Reject(v8_context, v8::Exception::Error(ToV8StringUnsafe( |
| + GetIsolate(), "Extension view no longer exists"))).IsNothing()) { |
| + // TODO: What action, if any, should be taken here? |
|
haraken
2016/07/15 02:38:41
I think we should just crash.
|
| + } |
| return; |
| } |
| module_registry->LoadModule( |
| @@ -752,7 +756,9 @@ void ModuleSystem::OnModuleLoaded( |
| v8::HandleScope handle_scope(GetIsolate()); |
| v8::Local<v8::Promise::Resolver> resolver_local( |
| v8::Local<v8::Promise::Resolver>::New(GetIsolate(), *resolver)); |
| - resolver_local->Resolve(context()->v8_context(), value); |
| + if (resolver_local->Resolve(context()->v8_context(), value).IsNothing()) { |
| + // TODO: What action, if any, should be taken here? |
|
haraken
2016/07/15 02:38:40
Ditto.
|
| + } |
| } |
| void ModuleSystem::ClobberExistingNativeHandler(const std::string& name) { |