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

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 utils.expose 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 ef97c818fc4f01aa5b9ac80e964afbbab7cfe99f..59f47c6dadebf3ca53f788b3d37ad1bf06ccceb4 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -618,6 +618,7 @@ void ModuleSystem::Private(const v8::FunctionCallbackInfo<v8::Value>& args) {
ToV8StringUnsafe(GetIsolate(), "Failed to create privates"));
return;
}
+ CHECK(privates.As<v8::Object>()->SetPrototype(v8::Null(args.GetIsolate())));
SetPrivate(obj, "privates", privates);
}
args.GetReturnValue().Set(privates);

Powered by Google App Engine
This is Rietveld 408576698