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

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

Issue 100473006: IDL compiler: [Constructor] w/o arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced to changes Created 7 years 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/V8TestOverloadedConstructors.cpp ('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 /*
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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if (UNLIKELY(info.Length() < 2)) { 436 if (UNLIKELY(info.Length() < 2)) {
437 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy pedefs", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsola te()); 437 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy pedefs", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsola te());
438 return; 438 return;
439 } 439 }
440 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); 440 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]);
441 if (info.Length() <= 1 || !info[1]->IsFunction()) { 441 if (info.Length() <= 1 || !info[1]->IsFunction()) {
442 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy pedefs", "The callback provided as parameter 2 is not a function."), info.GetIso late()); 442 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy pedefs", "The callback provided as parameter 2 is not a function."), info.GetIso late());
443 return; 443 return;
444 } 444 }
445 OwnPtr<TestCallback> testCallback = V8TestCallback::create(info[1], getExecu tionContext()); 445 OwnPtr<TestCallback> testCallback = V8TestCallback::create(info[1], getExecu tionContext());
446
447 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); 446 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback);
448 v8::Handle<v8::Object> wrapper = info.Holder(); 447 v8::Handle<v8::Object> wrapper = info.Holder();
449 448
450 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8 TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration: :Dependent); 449 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8 TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration: :Dependent);
451 v8SetReturnValue(info, wrapper); 450 v8SetReturnValue(info, wrapper);
452 } 451 }
453 452
454 } // namespace TestTypedefsV8Internal 453 } // namespace TestTypedefsV8Internal
455 454
456 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = { 455 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 fromInternalPointer(object)->deref(); 564 fromInternalPointer(object)->deref();
566 } 565 }
567 566
568 template<> 567 template<>
569 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 568 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
570 { 569 {
571 return toV8(impl, creationContext, isolate); 570 return toV8(impl, creationContext, isolate);
572 } 571 }
573 572
574 } // namespace WebCore 573 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestOverloadedConstructors.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698