| 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 "V8TestObject.h" | 8 #include "V8TestObject.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 98 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 99 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::Constant); | 99 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::Constant); |
| 100 v8SetReturnValueInt(info, 1); | 100 v8SetReturnValueInt(info, 1); |
| 101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 102 } | 102 } |
| 103 | 103 |
| 104 template<class CallbackInfo> | 104 template<class CallbackInfo> |
| 105 static void TestObjectForceSetAttributeOnThis(v8::Local<v8::Name> name, v8::Loca
l<v8::Value> v8Value, const CallbackInfo& info) | 105 static void TestObjectForceSetAttributeOnThis(v8::Local<v8::Name> name, v8::Loca
l<v8::Value> v8Value, const CallbackInfo& info) |
| 106 { | 106 { |
| 107 ASSERT(info.This()->IsObject()); | 107 ASSERT(info.This()->IsObject()); |
| 108 // TODO(bashi): Consider using CreateDataProperty() instead of ForceSet(). |
| 108 v8::Local<v8::Object>::Cast(info.This())->ForceSet(info.GetIsolate()->GetCur
rentContext(), name, v8Value); | 109 v8::Local<v8::Object>::Cast(info.This())->ForceSet(info.GetIsolate()->GetCur
rentContext(), name, v8Value); |
| 109 } | 110 } |
| 110 | 111 |
| 111 static void TestObjectConstructorAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 112 static void TestObjectConstructorAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 112 { | 113 { |
| 113 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 114 do { | 115 do { |
| 115 v8::Local<v8::Value> data = info.Data(); | 116 v8::Local<v8::Value> data = info.Data(); |
| 116 ASSERT(data->IsExternal()); | 117 ASSERT(data->IsExternal()); |
| 117 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()-
>CreationContext()); | 118 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()-
>CreationContext()); |
| (...skipping 12925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13043 | 13044 |
| 13044 void V8TestObject::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8::Ob
ject> prototypeObject) | 13045 void V8TestObject::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8::Ob
ject> prototypeObject) |
| 13045 { | 13046 { |
| 13046 v8::Local<v8::Context> v8Context(prototypeObject->CreationContext()); | 13047 v8::Local<v8::Context> v8Context(prototypeObject->CreationContext()); |
| 13047 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); | 13048 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); |
| 13048 v8::Local<v8::Object> unscopeables; | 13049 v8::Local<v8::Object> unscopeables; |
| 13049 if (v8CallBoolean(prototypeObject->HasOwnProperty(v8Context, unscopablesSymb
ol))) | 13050 if (v8CallBoolean(prototypeObject->HasOwnProperty(v8Context, unscopablesSymb
ol))) |
| 13050 unscopeables = prototypeObject->Get(v8Context, unscopablesSymbol).ToLoca
lChecked().As<v8::Object>(); | 13051 unscopeables = prototypeObject->Get(v8Context, unscopablesSymbol).ToLoca
lChecked().As<v8::Object>(); |
| 13051 else | 13052 else |
| 13052 unscopeables = v8::Object::New(isolate); | 13053 unscopeables = v8::Object::New(isolate); |
| 13053 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableLongAt
tribute"), v8::True(isolate)).FromJust(); | 13054 unscopeables->CreateDataProperty(v8Context, v8AtomicString(isolate, "unscope
ableLongAttribute"), v8::True(isolate)).FromJust(); |
| 13054 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 13055 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 13055 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableRu
ntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); | 13056 unscopeables->CreateDataProperty(v8Context, v8AtomicString(isolate, "uns
copeableRuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); |
| 13056 } | 13057 } |
| 13057 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 13058 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 13058 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableRu
ntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); | 13059 unscopeables->CreateDataProperty(v8Context, v8AtomicString(isolate, "uns
copeableRuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); |
| 13059 } | 13060 } |
| 13060 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableVoidMe
thod"), v8::True(isolate)).FromJust(); | 13061 unscopeables->CreateDataProperty(v8Context, v8AtomicString(isolate, "unscope
ableVoidMethod"), v8::True(isolate)).FromJust(); |
| 13061 prototypeObject->ForceSet(v8Context, unscopablesSymbol, unscopeables).FromJu
st(); | 13062 prototypeObject->CreateDataProperty(v8Context, unscopablesSymbol, unscopeabl
es).FromJust(); |
| 13062 } | 13063 } |
| 13063 | 13064 |
| 13064 void V8TestObject::refObject(ScriptWrappable* scriptWrappable) | 13065 void V8TestObject::refObject(ScriptWrappable* scriptWrappable) |
| 13065 { | 13066 { |
| 13066 scriptWrappable->toImpl<TestObject>()->ref(); | 13067 scriptWrappable->toImpl<TestObject>()->ref(); |
| 13067 } | 13068 } |
| 13068 | 13069 |
| 13069 void V8TestObject::derefObject(ScriptWrappable* scriptWrappable) | 13070 void V8TestObject::derefObject(ScriptWrappable* scriptWrappable) |
| 13070 { | 13071 { |
| 13071 scriptWrappable->toImpl<TestObject>()->deref(); | 13072 scriptWrappable->toImpl<TestObject>()->deref(); |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13590 ScriptState::Scope scope(scriptState); | 13591 ScriptState::Scope scope(scriptState); |
| 13591 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 13592 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 13592 if (holder.IsEmpty()) | 13593 if (holder.IsEmpty()) |
| 13593 return false; | 13594 return false; |
| 13594 | 13595 |
| 13595 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 13596 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
| 13596 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 13597 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
| 13597 } | 13598 } |
| 13598 | 13599 |
| 13599 } // namespace blink | 13600 } // namespace blink |
| OLD | NEW |