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 10814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10825 { | 10825 { |
10826 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 10826 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
10827 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 10827 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
10828 ASSERT(context); | 10828 ASSERT(context); |
10829 | 10829 |
10830 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | 10830 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { |
10831 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV
oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 10831 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV
oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
10832 } | 10832 } |
10833 } | 10833 } |
10834 | 10834 |
10835 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon
text, v8::Isolate* isolate) | |
10836 { | |
10837 ASSERT(impl); | |
10838 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl, isolate)); | |
10839 return V8TestObject::createWrapper(impl, creationContext, isolate); | |
10840 } | |
10841 | |
10842 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObject> impl,
v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | |
10843 { | |
10844 ASSERT(impl); | |
10845 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate)); | |
10846 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
10847 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
10848 // the same object de-ref functions, though, so use that as the basis of the
check. | |
10849 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
10850 | |
10851 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
10852 if (UNLIKELY(wrapper.IsEmpty())) | |
10853 return wrapper; | |
10854 | |
10855 installConditionallyEnabledProperties(wrapper, isolate); | |
10856 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf
o, wrapper, isolate); | |
10857 return wrapper; | |
10858 } | |
10859 | |
10860 | 10835 |
10861 void V8TestObject::refObject(ScriptWrappableBase* internalPointer) | 10836 void V8TestObject::refObject(ScriptWrappableBase* internalPointer) |
10862 { | 10837 { |
10863 fromInternalPointer(internalPointer)->ref(); | 10838 fromInternalPointer(internalPointer)->ref(); |
10864 } | 10839 } |
10865 | 10840 |
10866 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer) | 10841 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer) |
10867 { | 10842 { |
10868 fromInternalPointer(internalPointer)->deref(); | 10843 fromInternalPointer(internalPointer)->deref(); |
10869 } | 10844 } |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11413 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); | 11388 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); |
11414 if (block.HasCaught()) { | 11389 if (block.HasCaught()) { |
11415 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11390 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
11416 block.ReThrow(); | 11391 block.ReThrow(); |
11417 return false; | 11392 return false; |
11418 } | 11393 } |
11419 return true; | 11394 return true; |
11420 } | 11395 } |
11421 | 11396 |
11422 } // namespace blink | 11397 } // namespace blink |
OLD | NEW |