Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: extensions/renderer/v8_context_native_handler.cc

Issue 1235863003: Don't create cross origins references in the extension system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/v8_context_native_handler.cc
diff --git a/extensions/renderer/v8_context_native_handler.cc b/extensions/renderer/v8_context_native_handler.cc
index ed915cc423f717a1a5fb6ce04b96947e613db787..37f052bab6425a35c8dd284b039bb7366a5d67f0 100644
--- a/extensions/renderer/v8_context_native_handler.cc
+++ b/extensions/renderer/v8_context_native_handler.cc
@@ -8,6 +8,7 @@
#include "extensions/common/features/feature.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/script_context.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
namespace extensions {
@@ -53,7 +54,8 @@ void V8ContextNativeHandler::GetModuleSystem(
v8::Local<v8::Object>::Cast(args[0])->CreationContext();
ScriptContext* context =
dispatcher_->script_context_set().GetByV8Context(v8_context);
- args.GetReturnValue().Set(context->module_system()->NewInstance());
+ if (blink::WebFrame::scriptCanAccess(context->web_frame()))
not at google - send to devlin 2015/07/13 17:27:08 What is the context for "scriptCanAccess"? Does it
+ args.GetReturnValue().Set(context->module_system()->NewInstance());
}
void V8ContextNativeHandler::RunWithNativesEnabledModuleSystem(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698