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 "V8TestObject.h" | 7 #include "V8TestObject.h" |
8 | 8 |
9 #include "bindings/core/v8/BindingSecurity.h" | 9 #include "bindings/core/v8/BindingSecurity.h" |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 11343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11354 return v8SetReturnValueBool(info, result == DeleteSuccess); | 11354 return v8SetReturnValueBool(info, result == DeleteSuccess); |
11355 } | 11355 } |
11356 | 11356 |
11357 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) | 11357 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) |
11358 { | 11358 { |
11359 TestObjectV8Internal::indexedPropertyDeleter(index, info); | 11359 TestObjectV8Internal::indexedPropertyDeleter(index, info); |
11360 } | 11360 } |
11361 | 11361 |
11362 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall
backInfo<v8::Value>& info) | 11362 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall
backInfo<v8::Value>& info) |
11363 { | 11363 { |
| 11364 if (!name->IsString()) |
| 11365 return; |
11364 auto nameString = name.As<v8::String>(); | 11366 auto nameString = name.As<v8::String>(); |
11365 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11367 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11366 AtomicString propertyName = toCoreAtomicString(nameString); | 11368 AtomicString propertyName = toCoreAtomicString(nameString); |
11367 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11369 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
11368 ScriptValue result = impl->anonymousNamedGetter(scriptState, propertyName); | 11370 ScriptValue result = impl->anonymousNamedGetter(scriptState, propertyName); |
11369 if (result.isEmpty()) | 11371 if (result.isEmpty()) |
11370 return; | 11372 return; |
11371 v8SetReturnValue(info, result.v8Value()); | 11373 v8SetReturnValue(info, result.v8Value()); |
11372 } | 11374 } |
11373 | 11375 |
11374 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 11376 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
11375 { | 11377 { |
11376 TestObjectV8Internal::namedPropertyGetter(name, info); | 11378 TestObjectV8Internal::namedPropertyGetter(name, info); |
11377 } | 11379 } |
11378 | 11380 |
11379 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 11381 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
11380 { | 11382 { |
| 11383 if (!name->IsString()) |
| 11384 return; |
11381 auto nameString = name.As<v8::String>(); | 11385 auto nameString = name.As<v8::String>(); |
11382 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11386 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11383 V8StringResource<> propertyName(nameString); | 11387 V8StringResource<> propertyName(nameString); |
11384 if (!propertyName.prepare()) | 11388 if (!propertyName.prepare()) |
11385 return; | 11389 return; |
11386 V8StringResource<> propertyValue = v8Value; | 11390 V8StringResource<> propertyValue = v8Value; |
11387 if (!propertyValue.prepare()) | 11391 if (!propertyValue.prepare()) |
11388 return; | 11392 return; |
11389 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11393 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
11390 bool result = impl->anonymousNamedSetter(scriptState, propertyName, property
Value); | 11394 bool result = impl->anonymousNamedSetter(scriptState, propertyName, property
Value); |
11391 if (!result) | 11395 if (!result) |
11392 return; | 11396 return; |
11393 v8SetReturnValue(info, v8Value); | 11397 v8SetReturnValue(info, v8Value); |
11394 } | 11398 } |
11395 | 11399 |
11396 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 11400 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
11397 { | 11401 { |
11398 TestObjectV8Internal::namedPropertySetter(name, v8Value, info); | 11402 TestObjectV8Internal::namedPropertySetter(name, v8Value, info); |
11399 } | 11403 } |
11400 | 11404 |
11401 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) | 11405 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) |
11402 { | 11406 { |
| 11407 if (!name->IsString()) |
| 11408 return; |
11403 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11409 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11404 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 11410 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
11405 v8::String::Utf8Value namedProperty(name); | 11411 v8::String::Utf8Value namedProperty(name); |
11406 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); | 11412 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); |
11407 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11413 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
11408 bool result = impl->namedPropertyQuery(scriptState, propertyName, exceptionS
tate); | 11414 bool result = impl->namedPropertyQuery(scriptState, propertyName, exceptionS
tate); |
11409 if (exceptionState.throwIfNeeded()) | 11415 if (exceptionState.throwIfNeeded()) |
11410 return; | 11416 return; |
11411 if (!result) | 11417 if (!result) |
11412 return; | 11418 return; |
11413 v8SetReturnValueInt(info, v8::None); | 11419 v8SetReturnValueInt(info, v8::None); |
11414 } | 11420 } |
11415 | 11421 |
11416 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) | 11422 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) |
11417 { | 11423 { |
11418 TestObjectV8Internal::namedPropertyQuery(name, info); | 11424 TestObjectV8Internal::namedPropertyQuery(name, info); |
11419 } | 11425 } |
11420 | 11426 |
11421 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) | 11427 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) |
11422 { | 11428 { |
| 11429 if (!name->IsString()) |
| 11430 return; |
11423 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 11431 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
11424 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 11432 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
11425 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 11433 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
11426 DeleteResult result = impl->anonymousNamedDeleter(scriptState, propertyName)
; | 11434 DeleteResult result = impl->anonymousNamedDeleter(scriptState, propertyName)
; |
11427 if (result != DeleteUnknownProperty) | 11435 if (result != DeleteUnknownProperty) |
11428 return v8SetReturnValueBool(info, result == DeleteSuccess); | 11436 return v8SetReturnValueBool(info, result == DeleteSuccess); |
11429 } | 11437 } |
11430 | 11438 |
11431 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Boolean>& info) | 11439 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Boolean>& info) |
11432 { | 11440 { |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12554 ScriptState::Scope scope(scriptState); | 12562 ScriptState::Scope scope(scriptState); |
12555 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 12563 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
12556 if (holder.IsEmpty()) | 12564 if (holder.IsEmpty()) |
12557 return false; | 12565 return false; |
12558 | 12566 |
12559 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 12567 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
12560 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 12568 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
12561 } | 12569 } |
12562 | 12570 |
12563 } // namespace blink | 12571 } // namespace blink |
OLD | NEW |