Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bindings/modules/v8/custom/custom.gni Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 10754 matching lines...) Expand 10 before | Expand all | Expand 10 after
10765 { 10765 {
10766 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 10766 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
10767 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 10767 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
10768 ASSERT(context); 10768 ASSERT(context);
10769 10769
10770 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 10770 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
10771 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); 10771 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
10772 } 10772 }
10773 } 10773 }
10774 10774
10775 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon text, v8::Isolate* isolate)
10776 {
10777 ASSERT(impl);
10778 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl, isolate));
10779 return V8TestObject::createWrapper(impl, creationContext, isolate);
10780 }
10781
10782 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObject> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
10783 {
10784 ASSERT(impl);
10785 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate));
10786 const WrapperTypeInfo* actualInfo = impl->typeInfo();
10787 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
10788 // the same object de-ref functions, though, so use that as the basis of the check.
10789 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
10790
10791 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
10792 if (UNLIKELY(wrapper.IsEmpty()))
10793 return wrapper;
10794
10795 installConditionallyEnabledProperties(wrapper, isolate);
10796 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate);
10797 return wrapper;
10798 }
10799
10800 10775
10801 void V8TestObject::refObject(ScriptWrappableBase* internalPointer) 10776 void V8TestObject::refObject(ScriptWrappableBase* internalPointer)
10802 { 10777 {
10803 fromInternalPointer(internalPointer)->ref(); 10778 fromInternalPointer(internalPointer)->ref();
10804 } 10779 }
10805 10780
10806 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer) 10781 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer)
10807 { 10782 {
10808 fromInternalPointer(internalPointer)->deref(); 10783 fromInternalPointer(internalPointer)->deref();
10809 } 10784 }
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
11353 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); 11328 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF orPrivateScript", holder, v8String(scriptState->isolate(), cppValue));
11354 if (block.HasCaught()) { 11329 if (block.HasCaught()) {
11355 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat e(), exceptionState, block); 11330 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat e(), exceptionState, block);
11356 block.ReThrow(); 11331 block.ReThrow();
11357 return false; 11332 return false;
11358 } 11333 }
11359 return true; 11334 return true;
11360 } 11335 }
11361 11336
11362 } // namespace blink 11337 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698