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

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

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

Powered by Google App Engine
This is Rietveld 408576698