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

Side by Side Diff: Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1202683002: bindings: Supports per-member [Exposed] for attributes on prototype. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface5.h" 9 #include "V8TestInterface5.h"
10 10
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v 8::Value> v8Value, v8::Isolate* isolate) 1008 v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v 8::Value> v8Value, v8::Isolate* isolate)
1009 { 1009 {
1010 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 1010 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
1011 } 1011 }
1012 1012
1013 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) 1013 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
1014 { 1014 {
1015 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 1015 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
1016 } 1016 }
1017 1017
1018 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate) 1018 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
1019 { 1019 {
1020 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
1021 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1020 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1022 1021 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate);
1023 if (context && (context->isWorkerGlobalScope())) { 1022 if (context && (context->isWorkerGlobalScope())) {
1024 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need. 1023 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration ::CheckHolder};
1025 // TODO(yukishiino): Implement the feature again if there is a client. 1024 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration);
1026 } 1025 }
1027 if (context && (context->isDocument())) { 1026 if (context && (context->isDocument())) {
1028 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need. 1027 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration ::CheckHolder};
1029 // TODO(yukishiino): Implement the feature again if there is a client. 1028 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration);
1030 } 1029 }
1031 if (context && (context->isWorkerGlobalScope())) {
1032 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1033 // TODO(yukishiino): Implement the feature again if there is a client.
1034 }
1035 if (context && (context->isDocument())) {
1036 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1037 // TODO(yukishiino): Implement the feature again if there is a client.
1038 }
1039 if (context && (context->isWorkerGlobalScope())) {
1040 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1041 // TODO(yukishiino): Implement the feature again if there is a client.
1042 }
1043 if (context && (context->isDocument())) {
1044 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1045 // TODO(yukishiino): Implement the feature again if there is a client.
1046 }
1047 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope())) {
1048 #error No one is actually using per-member [Exposed] extended attribute. No t supported. Contact to blink-reviews-bindings@ if you need.
1049 // TODO(yukishiino): Implement the feature again if there is a client.
1050 }
1051 }
1052
1053 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject)
1054 {
1055 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1030 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1056 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1031 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1057 ASSERT(context); 1032 ASSERT(context);
1058 if (context && (context->isWorkerGlobalScope())) { 1033 if (context && (context->isWorkerGlobalScope())) {
1059 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0); 1034 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0);
1060 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont ext())).ToLocalChecked(); 1035 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont ext())).ToLocalChecked();
1061 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi cString(isolate, "workerExposedMethod"), function)); 1036 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi cString(isolate, "workerExposedMethod"), function));
1062 } 1037 }
1063 if (context && (context->isDocument())) { 1038 if (context && (context->isDocument())) {
1064 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::windowExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0); 1039 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::windowExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0);
(...skipping 17 matching lines...) Expand all
1082 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1057 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1083 } 1058 }
1084 1059
1085 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1060 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1086 { 1061 {
1087 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1062 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1088 } 1063 }
1089 1064
1090 } // namespace blink 1065 } // namespace blink
1091 #endif // ENABLE(CONDITION) 1066 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698