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 "V8TestSpecialOperations.h" | 7 #include "V8TestSpecialOperations.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/UnionTypesCore.h" | 10 #include "bindings/core/v8/UnionTypesCore.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 126 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
127 { | 127 { |
128 TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder())
; | 128 TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder())
; |
129 Vector<String> names; | 129 Vector<String> names; |
130 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestSpeci
alOperations", info.Holder(), info.GetIsolate()); | 130 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestSpeci
alOperations", info.Holder(), info.GetIsolate()); |
131 impl->namedPropertyEnumerator(names, exceptionState); | 131 impl->namedPropertyEnumerator(names, exceptionState); |
132 if (exceptionState.throwIfNeeded()) | 132 if (exceptionState.throwIfNeeded()) |
133 return; | 133 return; |
134 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); | 134 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); |
135 for (size_t i = 0; i < names.size(); ++i) { | 135 for (size_t i = 0; i < names.size(); ++i) { |
136 if (!v8CallBoolean(v8names->Set(info.GetIsolate()->GetCurrentContext(),
v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIsolate(), names[i])))) | 136 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) |
137 return; | 137 return; |
138 } | 138 } |
139 v8SetReturnValue(info, v8names); | 139 v8SetReturnValue(info, v8names); |
140 } | 140 } |
141 | 141 |
142 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 142 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
143 { | 143 { |
144 TestSpecialOperationsV8Internal::namedPropertyEnumerator(info); | 144 TestSpecialOperationsV8Internal::namedPropertyEnumerator(info); |
145 } | 145 } |
146 | 146 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 { | 181 { |
182 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 182 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
183 } | 183 } |
184 | 184 |
185 TestSpecialOperations* V8TestSpecialOperations::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) | 185 TestSpecialOperations* V8TestSpecialOperations::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) |
186 { | 186 { |
187 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; | 187 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
188 } | 188 } |
189 | 189 |
190 } // namespace blink | 190 } // namespace blink |
OLD | NEW |