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

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

Issue 1412433004: bindings: Generation of dictionary IDLs with RuntimeEnabled attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2c9f7764972024460d26035fd108fe51d37c143..2edd5231179712c353274b5d8c2fdcbba286455f 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -363,6 +363,22 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
}
}
+ if (RuntimeEnabledFeatures::runtimeFeatureEnabled()) {
+ v8::Local<v8::Value> runtimeMemberValue;
+ if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "runtimeMember")).ToLocal(&runtimeMemberValue)) {
+ exceptionState.rethrowV8Exception(block.Exception());
+ return;
+ }
+ if (runtimeMemberValue.IsEmpty() || runtimeMemberValue->IsUndefined()) {
+ // Do nothing.
+ } else {
+ bool runtimeMember = toBoolean(isolate, runtimeMemberValue, exceptionState);
+ if (exceptionState.hadException())
+ return;
+ impl.setRuntimeMember(runtimeMember);
+ }
+ }
+
{
v8::Local<v8::Value> stringArrayMemberValue;
if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "stringArrayMember")).ToLocal(&stringArrayMemberValue)) {
@@ -768,6 +784,11 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
return false;
}
+ if (impl.hasRuntimeMember()) {
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "runtimeMember"), v8Boolean(impl.runtimeMember(), isolate))))
+ return false;
+ }
+
if (impl.hasStringArrayMember()) {
if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "stringArrayMember"), toV8(impl.stringArrayMember(), creationContext, isolate))))
return false;
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/TestDictionary.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698