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

Unified Diff: extensions/renderer/module_system.cc

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for failing tests Created 4 years, 8 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
Index: extensions/renderer/module_system.cc
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc
index 9f708bf3eac2cc04c19cba6b6b299a58c3f504ef..dd13786f198f9267b084caa0b810259205ef1e0e 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -618,6 +618,10 @@ void ModuleSystem::Private(const v8::FunctionCallbackInfo<v8::Value>& args) {
ToV8StringUnsafe(GetIsolate(), "Failed to create privates"));
return;
}
+ v8::Maybe<bool> maybe =
+ privates.As<v8::Object>()->SetPrototype(context()->v8_context(),
+ v8::Null(args.GetIsolate()));
+ CHECK(maybe.IsJust() && maybe.FromJust());
SetPrivate(obj, "privates", privates);
}
args.GetReturnValue().Set(privates);
« no previous file with comments | « chrome/renderer/resources/extensions/web_view/chrome_web_view.js ('k') | extensions/renderer/module_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698