OLD | NEW |
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. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(
holder); | 64 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(
holder); |
65 | 65 |
66 V8SetReturnValueFast(info, WTF::GetPtr(impl->attr1()), impl); | 66 V8SetReturnValueFast(info, WTF::GetPtr(impl->attr1()), impl); |
67 } | 67 } |
68 | 68 |
69 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
nCallbackInfo<v8::Value>& info) { | 69 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
nCallbackInfo<v8::Value>& info) { |
70 v8::Isolate* isolate = info.GetIsolate(); | 70 v8::Isolate* isolate = info.GetIsolate(); |
71 ALLOW_UNUSED_LOCAL(isolate); | 71 ALLOW_UNUSED_LOCAL(isolate); |
72 | 72 |
73 v8::Local<v8::Object> holder = info.Holder(); | 73 v8::Local<v8::Object> holder = info.Holder(); |
| 74 ALLOW_UNUSED_LOCAL(holder); |
| 75 |
74 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(
holder); | 76 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl(
holder); |
75 | 77 |
76 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terfaceGarbageCollected", "attr1"); | 78 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terfaceGarbageCollected", "attr1"); |
77 | 79 |
78 // Prepare the value to be set. | 80 // Prepare the value to be set. |
79 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); | 81 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toI
mplWithTypeCheck(info.GetIsolate(), v8Value); |
80 | 82 |
81 // Type check per: http://heycam.github.io/webidl/#es-interface | 83 // Type check per: http://heycam.github.io/webidl/#es-interface |
82 if (!cppValue) { | 84 if (!cppValue) { |
83 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); | 85 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
aceGarbageCollected'."); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 TestInterfaceGarbageCollected* NativeValueTraits<TestInterfaceGarbageCollected>:
:NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& e
xceptionState) { | 431 TestInterfaceGarbageCollected* NativeValueTraits<TestInterfaceGarbageCollected>:
:NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& e
xceptionState) { |
430 TestInterfaceGarbageCollected* nativeValue = V8TestInterfaceGarbageCollected::
toImplWithTypeCheck(isolate, value); | 432 TestInterfaceGarbageCollected* nativeValue = V8TestInterfaceGarbageCollected::
toImplWithTypeCheck(isolate, value); |
431 if (!nativeValue) { | 433 if (!nativeValue) { |
432 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( | 434 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( |
433 "TestInterfaceGarbageCollected")); | 435 "TestInterfaceGarbageCollected")); |
434 } | 436 } |
435 return nativeValue; | 437 return nativeValue; |
436 } | 438 } |
437 | 439 |
438 } // namespace blink | 440 } // namespace blink |
OLD | NEW |