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

Unified Diff: gin/converter.h

Issue 1433293004: [Extensions] Don't allow gin::Define to be overridden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « extensions/renderer/v8_helpers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/converter.h
diff --git a/gin/converter.h b/gin/converter.h
index 8d17d41c29fba56bd5bae0a66d895f7cd035d79b..12348e2d852724dccd90d04f0cd2dbe1103ca91f 100644
--- a/gin/converter.h
+++ b/gin/converter.h
@@ -20,7 +20,8 @@ bool SetProperty(v8::Isolate* isolate,
v8::Local<v8::Object> object,
KeyType key,
v8::Local<v8::Value> value) {
- auto maybe = object->Set(isolate->GetCurrentContext(), key, value);
+ auto maybe =
+ object->DefineOwnProperty(isolate->GetCurrentContext(), key, value);
return !maybe.IsNothing() && maybe.FromJust();
}
« no previous file with comments | « extensions/renderer/v8_helpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698