chore: disable JS impl when //extensions support is on (#19512)

This commit is contained in:
Jeremy Apthorp 2019-07-31 14:25:41 -07:00 committed by GitHub
parent a5f87cee6b
commit c71cdce0b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 9 deletions

View file

@ -10,6 +10,7 @@
#include "base/path_service.h"
#include "base/process/process_handle.h"
#include "content/public/renderer/render_frame.h"
#include "electron/buildflags/buildflags.h"
#include "gin/converter.h"
#include "native_mate/dictionary.h"
#include "shell/common/api/electron_bindings.h"
@ -266,6 +267,9 @@ void AtomSandboxedRendererClient::SetupExtensionWorldOverrides(
v8::Handle<v8::Context> context,
content::RenderFrame* render_frame,
int world_id) {
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
NOTREACHED();
#else
auto* isolate = context->GetIsolate();
mate::Dictionary process = mate::Dictionary::CreateEmpty(isolate);
@ -284,6 +288,7 @@ void AtomSandboxedRendererClient::SetupExtensionWorldOverrides(
node::native_module::NativeModuleEnv::CompileAndCall(
context, "electron/js2c/content_script_bundle", &isolated_bundle_params,
&isolated_bundle_args, nullptr);
#endif
}
void AtomSandboxedRendererClient::WillReleaseScriptContext(