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

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

Issue 196343032: Implement ImageData constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Generate code that custom wrap()s constructor instances 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 425
426 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 426 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
427 { 427 {
428 if (UNLIKELY(info.Length() < 1)) { 428 if (UNLIKELY(info.Length() < 1)) {
429 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", Exce ptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 429 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", Exce ptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
430 return; 430 return;
431 } 431 }
432 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); 432 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]);
433 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello); 433 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello);
434
434 v8::Handle<v8::Object> wrapper = info.Holder(); 435 v8::Handle<v8::Object> wrapper = info.Holder();
435 436 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8 TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration: :Independent);
436 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8 TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration: :Dependent);
437 v8SetReturnValue(info, wrapper); 437 v8SetReturnValue(info, wrapper);
438 } 438 }
439 439
440 } // namespace TestTypedefsV8Internal 440 } // namespace TestTypedefsV8Internal
441 441
442 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = { 442 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 */}, 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 */},
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 */}, 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 */},
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 */}, 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 */},
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 */}, 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 */},
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 fromInternalPointer(object)->deref(); 548 fromInternalPointer(object)->deref();
549 } 549 }
550 550
551 template<> 551 template<>
552 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 552 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
553 { 553 {
554 return toV8(impl, creationContext, isolate); 554 return toV8(impl, creationContext, isolate);
555 } 555 }
556 556
557 } // namespace WebCore 557 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698