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

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

Issue 210663003: Use |isolate| local variable in bindings, clean up comments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update extension Created 6 years, 9 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
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be
3 * 3 // found in the LICENSE file.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30 4
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
32 6
33 #include "config.h" 7 #include "config.h"
34 #include "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
35 9
36 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
37 #include "V8Bar.h" 11 #include "V8Bar.h"
38 #include "V8Foo.h" 12 #include "V8Foo.h"
39 #include "V8TestCallbackInterface.h" 13 #include "V8TestCallbackInterface.h"
40 #include "V8TestInterfaceEmpty.h" 14 #include "V8TestInterfaceEmpty.h"
41 #include "V8TestSubObj.h" 15 #include "V8TestSubObj.h"
(...skipping 13 matching lines...) Expand all
55 static void initializeScriptWrappableForInterface(TestTypedefs* object) 29 static void initializeScriptWrappableForInterface(TestTypedefs* object)
56 { 30 {
57 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 31 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
58 ScriptWrappable::setTypeInfoInObject(object, &V8TestTypedefs::wrapperTyp eInfo); 32 ScriptWrappable::setTypeInfoInObject(object, &V8TestTypedefs::wrapperTyp eInfo);
59 else 33 else
60 ASSERT_NOT_REACHED(); 34 ASSERT_NOT_REACHED();
61 } 35 }
62 36
63 } // namespace WebCore 37 } // namespace WebCore
64 38
65 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows:
66 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
67 // in the global namespace.
68 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c)
69 void webCoreInitializeScriptWrappableForInterface(WebCore::TestTypedefs* object) 39 void webCoreInitializeScriptWrappableForInterface(WebCore::TestTypedefs* object)
70 { 40 {
71 WebCore::initializeScriptWrappableForInterface(object); 41 WebCore::initializeScriptWrappableForInterface(object);
72 } 42 }
73 43
74 namespace WebCore { 44 namespace WebCore {
75 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V 8TestTypedefs::domTemplate, V8TestTypedefs::derefObject, 0, 0, 0, V8TestTypedefs ::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; 45 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V 8TestTypedefs::domTemplate, V8TestTypedefs::derefObject, 0, 0, 0, V8TestTypedefs ::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
76 46
77 namespace TestTypedefsV8Internal { 47 namespace TestTypedefsV8Internal {
78 48
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 388
419 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 389 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
420 { 390 {
421 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 391 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
422 TestTypedefsV8Internal::methodWithExceptionMethod(info); 392 TestTypedefsV8Internal::methodWithExceptionMethod(info);
423 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 393 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
424 } 394 }
425 395
426 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 396 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
427 { 397 {
398 v8::Isolate* isolate = info.GetIsolate();
428 if (UNLIKELY(info.Length() < 1)) { 399 if (UNLIKELY(info.Length() < 1)) {
429 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", Exce ptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 400 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", Exce ptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
430 return; 401 return;
431 } 402 }
432 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); 403 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]);
433 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello); 404 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello);
434 405
435 v8::Handle<v8::Object> wrapper = info.Holder(); 406 v8::Handle<v8::Object> wrapper = info.Holder();
436 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8 TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration: :Independent); 407 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8 TestTypedefs::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independe nt);
437 v8SetReturnValue(info, wrapper); 408 v8SetReturnValue(info, wrapper);
438 } 409 }
439 410
440 } // namespace TestTypedefsV8Internal 411 } // namespace TestTypedefsV8Internal
441 412
442 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = { 413 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = {
443 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttribu teGetterCallback, TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetterCal lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro pertyAttribute>(v8::None), 0 /* on instance */}, 414 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttribu teGetterCallback, TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetterCal lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro pertyAttribute>(v8::None), 0 /* on instance */},
444 {"TestSubObj", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy pedefsV8Internal::TestTypedefsReplaceableAttributeSetterCallback, 0, 0, const_ca st<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo), static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on ins tance */}, 415 {"TestSubObj", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy pedefsV8Internal::TestTypedefsReplaceableAttributeSetterCallback, 0, 0, const_ca st<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo), static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on ins tance */},
445 {"attrWithGetterException", TestTypedefsV8Internal::attrWithGetterExceptionA ttributeGetterCallback, TestTypedefsV8Internal::attrWithGetterExceptionAttribute SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas t<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 416 {"attrWithGetterException", TestTypedefsV8Internal::attrWithGetterExceptionA ttributeGetterCallback, TestTypedefsV8Internal::attrWithGetterExceptionAttribute SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas t<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
446 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionA ttributeGetterCallback, TestTypedefsV8Internal::attrWithSetterExceptionAttribute SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas t<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 417 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionA ttributeGetterCallback, TestTypedefsV8Internal::attrWithSetterExceptionAttribute SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas t<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 fromInternalPointer(object)->deref(); 519 fromInternalPointer(object)->deref();
549 } 520 }
550 521
551 template<> 522 template<>
552 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 523 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
553 { 524 {
554 return toV8(impl, creationContext, isolate); 525 return toV8(impl, creationContext, isolate);
555 } 526 }
556 527
557 } // namespace WebCore 528 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698