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

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

Issue 100473006: IDL compiler: [Constructor] w/o arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 4915 matching lines...) Expand 10 before | Expand all | Expand 10 after
4926 { 4926 {
4927 if (UNLIKELY(info.Length() < 1)) { 4927 if (UNLIKELY(info.Length() < 1)) {
4928 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestOb ject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate ()); 4928 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestOb ject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate ());
4929 return; 4929 return;
4930 } 4930 }
4931 if (info.Length() <= 0 || !info[0]->IsFunction()) { 4931 if (info.Length() <= 0 || !info[0]->IsFunction()) {
4932 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestOb ject", "The callback provided as parameter 1 is not a function."), info.GetIsola te()); 4932 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestOb ject", "The callback provided as parameter 1 is not a function."), info.GetIsola te());
4933 return; 4933 return;
4934 } 4934 }
4935 OwnPtr<TestCallback> testCallback = V8TestCallback::create(info[0], getExecu tionContext()); 4935 OwnPtr<TestCallback> testCallback = V8TestCallback::create(info[0], getExecu tionContext());
4936
4937 RefPtr<TestObj> impl = TestObj::create(testCallback); 4936 RefPtr<TestObj> impl = TestObj::create(testCallback);
4938 v8::Handle<v8::Object> wrapper = info.Holder(); 4937 v8::Handle<v8::Object> wrapper = info.Holder();
4939 4938
4940 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl.release(), &V8Te stObject::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dep endent); 4939 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl.release(), &V8Te stObject::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dep endent);
4941 info.GetReturnValue().Set(wrapper); 4940 info.GetReturnValue().Set(wrapper);
4942 } 4941 }
4943 4942
4944 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 4943 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
4945 { 4944 {
4946 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); 4945 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
5409 fromInternalPointer(object)->deref(); 5408 fromInternalPointer(object)->deref();
5410 } 5409 }
5411 5410
5412 template<> 5411 template<>
5413 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 5412 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
5414 { 5413 {
5415 return toV8(impl, creationContext, isolate); 5414 return toV8(impl, creationContext, isolate);
5416 } 5415 }
5417 5416
5418 } // namespace WebCore 5417 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698