| Index: extensions/renderer/native_extension_bindings_system.cc
|
| diff --git a/extensions/renderer/native_extension_bindings_system.cc b/extensions/renderer/native_extension_bindings_system.cc
|
| index 94d10aa3a1c3147d714e41c85440ccdc4156b473..d1f8bf1bc8fdd277926e4d2f11d0f300f016e3dc 100644
|
| --- a/extensions/renderer/native_extension_bindings_system.cc
|
| +++ b/extensions/renderer/native_extension_bindings_system.cc
|
| @@ -361,7 +361,8 @@ NativeExtensionBindingsSystem::NativeExtensionBindingsSystem(
|
| base::Unretained(this)),
|
| base::Bind(&NativeExtensionBindingsSystem::OnEventListenerChanged,
|
| base::Unretained(this)),
|
| - APILastError(base::Bind(&GetRuntime), base::Bind(&AddConsoleError))),
|
| + APILastError(base::Bind(&GetLastErrorParents),
|
| + base::Bind(&AddConsoleError))),
|
| weak_factory_(this) {
|
| api_system_.RegisterCustomType("storage.StorageArea",
|
| base::Bind(&StorageArea::CreateStorageArea));
|
| @@ -578,8 +579,15 @@ v8::Local<v8::Object> NativeExtensionBindingsSystem::GetAPIHelper(
|
| return root_binding;
|
| }
|
|
|
| -v8::Local<v8::Object> NativeExtensionBindingsSystem::GetRuntime(
|
| - v8::Local<v8::Context> context) {
|
| +v8::Local<v8::Object> NativeExtensionBindingsSystem::GetLastErrorParents(
|
| + v8::Local<v8::Context> context,
|
| + v8::Local<v8::Object>* secondary_parent) {
|
| + if (secondary_parent &&
|
| + IsAPIFeatureAvailable(context, "extension.lastError")) {
|
| + *secondary_parent = GetAPIHelper(
|
| + context, gin::StringToSymbol(context->GetIsolate(), "extension"));
|
| + }
|
| +
|
| return GetAPIHelper(context,
|
| gin::StringToSymbol(context->GetIsolate(), "runtime"));
|
| }
|
|
|