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. 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 "V8TestSpecialOperations.h" | 8 #include "V8TestSpecialOperations.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 83 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
84 { | 84 { |
85 if (!name->IsString()) | 85 if (!name->IsString()) |
86 return; | 86 return; |
87 auto nameString = name.As<v8::String>(); | 87 auto nameString = name.As<v8::String>(); |
88 TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder())
; | 88 TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder())
; |
89 TOSTRING_VOID(V8StringResource<>, propertyName, nameString); | 89 TOSTRING_VOID(V8StringResource<>, propertyName, nameString); |
90 Node* propertyValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value
); | 90 Node* propertyValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value
); |
| 91 if (!propertyValue && !isUndefinedOrNull(v8Value)) { |
| 92 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 93 exceptionState.throwIfNeeded(); |
| 94 return; |
| 95 } |
91 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 96 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
92 if (!result) | 97 if (!result) |
93 return; | 98 return; |
94 v8SetReturnValue(info, v8Value); | 99 v8SetReturnValue(info, v8Value); |
95 } | 100 } |
96 | 101 |
97 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 102 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
98 { | 103 { |
99 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
100 TestSpecialOperationsV8Internal::namedPropertySetter(name, v8Value, info); | 105 TestSpecialOperationsV8Internal::namedPropertySetter(name, v8Value, info); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 { | 199 { |
195 scriptWrappable->toImpl<TestSpecialOperations>()->ref(); | 200 scriptWrappable->toImpl<TestSpecialOperations>()->ref(); |
196 } | 201 } |
197 | 202 |
198 void V8TestSpecialOperations::derefObject(ScriptWrappable* scriptWrappable) | 203 void V8TestSpecialOperations::derefObject(ScriptWrappable* scriptWrappable) |
199 { | 204 { |
200 scriptWrappable->toImpl<TestSpecialOperations>()->deref(); | 205 scriptWrappable->toImpl<TestSpecialOperations>()->deref(); |
201 } | 206 } |
202 | 207 |
203 } // namespace blink | 208 } // namespace blink |
OLD | NEW |