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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp

Issue 2471393004: bindings: Use forward declarations for wrapper types in dictionary_impl (Closed)
Patch Set: Added copy operator Created 4 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
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
index f935eadcd79a3edef50a2a23122d6a9d8b410b8e..dd6e8fa3a7c8afac1865abb2358685860282f3c2 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -20,6 +20,7 @@
#include "bindings/core/v8/V8TestInterface.h"
#include "bindings/core/v8/V8TestInterface2.h"
#include "bindings/core/v8/V8TestInterfaceGarbageCollected.h"
+#include "bindings/core/v8/V8TestObject.h"
#include "bindings/core/v8/V8Uint8Array.h"
#include "core/dom/FlexibleArrayBufferView.h"
#include "core/frame/Deprecation.h"
@@ -514,6 +515,20 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
impl.setTestInterfaceSequenceMember(testInterfaceSequenceMember);
}
+ v8::Local<v8::Value> testObjectSequenceMemberValue;
+ if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "testObjectSequenceMember")).ToLocal(&testObjectSequenceMemberValue)) {
+ exceptionState.rethrowV8Exception(block.Exception());
+ return;
+ }
+ if (testObjectSequenceMemberValue.IsEmpty() || testObjectSequenceMemberValue->IsUndefined()) {
+ // Do nothing.
+ } else {
+ HeapVector<Member<TestObject>> testObjectSequenceMember = (toMemberNativeArray<TestObject>(testObjectSequenceMemberValue, 0, isolate, exceptionState));
+ if (exceptionState.hadException())
+ return;
+ impl.setTestObjectSequenceMember(testObjectSequenceMember);
+ }
+
v8::Local<v8::Value> uint8ArrayMemberValue;
if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "uint8ArrayMember")).ToLocal(&uint8ArrayMemberValue)) {
exceptionState.rethrowV8Exception(block.Exception());
@@ -751,6 +766,11 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
return false;
}
+ if (impl.hasTestObjectSequenceMember()) {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "testObjectSequenceMember"), toV8(impl.testObjectSequenceMember(), creationContext, isolate))))
+ return false;
+ }
+
if (impl.hasUint8ArrayMember()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "uint8ArrayMember"), toV8(impl.uint8ArrayMember(), creationContext, isolate))))
return false;

Powered by Google App Engine
This is Rietveld 408576698