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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor.cpp

Issue 424163002: Enable the WebIDL [Exposed] annotation on an interface's members. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: missed renames Created 6 years, 4 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 #include "V8TestInterfaceConstructor.h" 8 #include "V8TestInterfaceConstructor.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 } // namespace blink 35 } // namespace blink
36 36
37 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceConstructo r* object) 37 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceConstructo r* object)
38 { 38 {
39 blink::initializeScriptWrappableForInterface(object); 39 blink::initializeScriptWrappableForInterface(object);
40 } 40 }
41 41
42 namespace blink { 42 namespace blink {
43 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor:: derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod s, 0, WrapperTypeObjectPrototype, RefCountedObject }; 43 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor:: derefObject, 0, 0, 0, V8TestInterfaceConstructor::installConditionallyEnabledMet hods, 0, WrapperTypeObjectPrototype, RefCountedObject };
44 44
45 namespace TestInterfaceConstructorV8Internal { 45 namespace TestInterfaceConstructorV8Internal {
46 46
47 template <typename T> void V8_USE(T) { } 47 template <typename T> void V8_USE(T) { }
48 48
49 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) 49 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
50 { 50 {
51 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate()); 51 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
52 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 52 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
53 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ; 53 Document& document = *toDocument(currentExecutionContext(info.GetIsolate())) ;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); 217 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length()));
218 exceptionState.throwIfNeeded(); 218 exceptionState.throwIfNeeded();
219 return; 219 return;
220 } 220 }
221 exceptionState.throwTypeError("No matching constructor signature."); 221 exceptionState.throwTypeError("No matching constructor signature.");
222 exceptionState.throwIfNeeded(); 222 exceptionState.throwIfNeeded();
223 } 223 }
224 224
225 } // namespace TestInterfaceConstructorV8Internal 225 } // namespace TestInterfaceConstructorV8Internal
226 226
227 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test InterfaceConstructor::derefObject, 0, 0, 0, V8TestInterfaceConstructor::installP erContextEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject }; 227 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test InterfaceConstructor::derefObject, 0, 0, 0, V8TestInterfaceConstructor::installC onditionallyEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject };
228 228
229 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall backInfo<v8::Value>& info) 229 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall backInfo<v8::Value>& info)
230 { 230 {
231 if (!info.IsConstructCall()) { 231 if (!info.IsConstructCall()) {
232 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab leAsFunction("Audio"), info.GetIsolate()); 232 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab leAsFunction("Audio"), info.GetIsolate());
233 return; 233 return;
234 } 234 }
235 235
236 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) { 236 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) {
237 v8SetReturnValue(info, info.Holder()); 237 v8SetReturnValue(info, info.Holder());
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo(); 362 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo();
363 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have 363 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
364 // the same object de-ref functions, though, so use that as the basis of the check. 364 // the same object de-ref functions, though, so use that as the basis of the check.
365 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); 365 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
366 } 366 }
367 367
368 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 368 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
369 if (UNLIKELY(wrapper.IsEmpty())) 369 if (UNLIKELY(wrapper.IsEmpty()))
370 return wrapper; 370 return wrapper;
371 371
372 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 372 installConditionallyEnabledProperties(wrapper, isolate);
373 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, & wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); 373 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, & wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
374 return wrapper; 374 return wrapper;
375 } 375 }
376 376
377 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe r) 377 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe r)
378 { 378 {
379 fromInternalPointer(internalPointer)->deref(); 379 fromInternalPointer(internalPointer)->deref();
380 } 380 }
381 381
382 template<> 382 template<>
383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
384 { 384 {
385 return toV8(impl, creationContext, isolate); 385 return toV8(impl, creationContext, isolate);
386 } 386 }
387 387
388 } // namespace blink 388 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698