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

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

Issue 111373003: Migrate bindings constructors to the new ExceptionState model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 namespace WebCore { 67 namespace WebCore {
68 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor:: derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod s, 0, WrapperTypeObjectPrototype }; 68 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor:: derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod s, 0, WrapperTypeObjectPrototype };
69 69
70 namespace TestInterfaceConstructorV8Internal { 70 namespace TestInterfaceConstructorV8Internal {
71 71
72 template <typename T> void V8_USE(T) { } 72 template <typename T> void V8_USE(T) { }
73 73
74 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 74 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
75 { 75 {
76 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 76 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor", info.Holder(), info.GetIsolate());
77 ExecutionContext* context = getExecutionContext(); 77 ExecutionContext* context = getExecutionContext();
78 Document& document = *toDocument(getExecutionContext()); 78 Document& document = *toDocument(getExecutionContext());
79 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con text, document, exceptionState); 79 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con text, document, exceptionState);
80 v8::Handle<v8::Object> wrapper = info.Holder(); 80 v8::Handle<v8::Object> wrapper = info.Holder();
81 if (exceptionState.throwIfNeeded()) 81 if (exceptionState.throwIfNeeded())
82 return; 82 return;
83 83
84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( ), WrapperConfiguration::Dependent); 84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( ), WrapperConfiguration::Dependent);
85 v8SetReturnValue(info, wrapper); 85 v8SetReturnValue(info, wrapper);
86 } 86 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 fromInternalPointer(object)->deref(); 176 fromInternalPointer(object)->deref();
177 } 177 }
178 178
179 template<> 179 template<>
180 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 180 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
181 { 181 {
182 return toV8(impl, creationContext, isolate); 182 return toV8(impl, creationContext, isolate);
183 } 183 }
184 184
185 } // namespace WebCore 185 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698