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

Unified Diff: Source/bindings/core/v8/V8LazyEventListener.cpp

Issue 1153613007: bindings: Use CreateDataProperty() instead of ForceSet() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix uninitialized error Created 5 years, 6 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 | « Source/bindings/core/v8/ScriptValueSerializer.cpp ('k') | Source/bindings/core/v8/V8ObjectBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8LazyEventListener.cpp
diff --git a/Source/bindings/core/v8/V8LazyEventListener.cpp b/Source/bindings/core/v8/V8LazyEventListener.cpp
index 6b36c50e3ca671968cb0c2863f4d937909debb2d..5e6444437c2661c9e27b9b3b2d0e63b68a7b5329 100644
--- a/Source/bindings/core/v8/V8LazyEventListener.cpp
+++ b/Source/bindings/core/v8/V8LazyEventListener.cpp
@@ -184,11 +184,11 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
v8::Local<v8::Object> thisObject = v8::Object::New(isolate());
if (thisObject.IsEmpty())
return;
- if (!v8CallBoolean(thisObject->ForceSet(scriptState->context(), v8::Integer::New(isolate(), 0), nodeWrapper)))
+ if (!v8CallBoolean(thisObject->CreateDataProperty(scriptState->context(), 0, nodeWrapper)))
return;
- if (!v8CallBoolean(thisObject->ForceSet(scriptState->context(), v8::Integer::New(isolate(), 1), formWrapper)))
+ if (!v8CallBoolean(thisObject->CreateDataProperty(scriptState->context(), 1, formWrapper)))
return;
- if (!v8CallBoolean(thisObject->ForceSet(scriptState->context(), v8::Integer::New(isolate(), 2), documentWrapper)))
+ if (!v8CallBoolean(thisObject->CreateDataProperty(scriptState->context(), 2, documentWrapper)))
return;
// FIXME: Remove this code when we stop doing the 'with' hack above.
« no previous file with comments | « Source/bindings/core/v8/ScriptValueSerializer.cpp ('k') | Source/bindings/core/v8/V8ObjectBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698