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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 121 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
122 { 122 {
123 if (UNLIKELY(info.Length() < 1)) { 123 if (UNLIKELY(info.Length() < 1)) {
124 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceWillBe GarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 124 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceWillBe GarbageCollected", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
125 return; 125 return;
126 } 126 }
127 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 127 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
128 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str); 128 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str);
129
129 v8::Handle<v8::Object> wrapper = info.Holder(); 130 v8::Handle<v8::Object> wrapper = info.Holder();
130 131 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra pper, info.GetIsolate(), WrapperConfiguration::Independent);
131 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect ed>(impl.release(), &V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo, wra pper, info.GetIsolate(), WrapperConfiguration::Dependent);
132 v8SetReturnValue(info, wrapper); 132 v8SetReturnValue(info, wrapper);
133 } 133 }
134 134
135 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal 135 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal
136 136
137 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar bageCollectedAttributes[] = { 137 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar bageCollectedAttributes[] = {
138 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr opertyAttribute>(v8::None), 0 /* on instance */}, 138 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr opertyAttribute>(v8::None), 0 /* on instance */},
139 }; 139 };
140 140
141 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag eCollectedMethods[] = { 141 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag eCollectedMethods[] = {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 #endif // !ENABLE(OILPAN) 238 #endif // !ENABLE(OILPAN)
239 } 239 }
240 240
241 template<> 241 template<>
242 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 242 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
243 { 243 {
244 return toV8(impl, creationContext, isolate); 244 return toV8(impl, creationContext, isolate);
245 } 245 }
246 246
247 } // namespace WebCore 247 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698