summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/module_system.cc
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2015-10-29 09:21:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-29 16:22:06 +0000
commit520e622d4d7a0e8e94b1e528f426070c604171c8 (patch)
treee887acfbcd62d4bb4ad24f419334cfd7762d84a5 /extensions/renderer/module_system.cc
parent5d98eb9ffa726aee7605b096fe90035191a1463a (diff)
downloadchromium_src-520e622d4d7a0e8e94b1e528f426070c604171c8.zip
chromium_src-520e622d4d7a0e8e94b1e528f426070c604171c8.tar.gz
chromium_src-520e622d4d7a0e8e94b1e528f426070c604171c8.tar.bz2
Don't use calling context in chrome
Usually, calling context should be equal to current context. Then using the current context is easier, and it's always defined what it is. If they are different, and have different privileges, the check on calling context does not prevent anything, because an attacker can freely chose it. It's, however, also not safer to use the current context in that situation... contexts with different privileges must not have access to each other. BUG=541703 Review URL: https://codereview.chromium.org/1401913003 Cr-Commit-Position: refs/heads/master@{#356864}
Diffstat (limited to 'extensions/renderer/module_system.cc')
-rw-r--r--extensions/renderer/module_system.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc
index 5005fca..b828ca0 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -67,7 +67,7 @@ void Fatal(ScriptContext* context, const std::string& message) {
void Warn(v8::Isolate* isolate, const std::string& message) {
ScriptContext* script_context =
- ScriptContextSet::GetContextByV8Context(isolate->GetCallingContext());
+ ScriptContextSet::GetContextByV8Context(isolate->GetCurrentContext());
console::Warn(script_context ? script_context->GetRenderFrame() : nullptr,
message);
}