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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: MessagePort. 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 namespace WebCore { 69 namespace WebCore {
70 const WrapperTypeInfo V8TestCustomAccessors::wrapperTypeInfo = { gin::kEmbedderB link, V8TestCustomAccessors::GetTemplate, V8TestCustomAccessors::derefObject, 0, 0, 0, V8TestCustomAccessors::installPerContextEnabledMethods, 0, WrapperTypeObj ectPrototype }; 70 const WrapperTypeInfo V8TestCustomAccessors::wrapperTypeInfo = { gin::kEmbedderB link, V8TestCustomAccessors::GetTemplate, V8TestCustomAccessors::derefObject, 0, 0, 0, V8TestCustomAccessors::installPerContextEnabledMethods, 0, WrapperTypeObj ectPrototype };
71 71
72 namespace TestCustomAccessorsV8Internal { 72 namespace TestCustomAccessorsV8Internal {
73 73
74 template <typename T> void V8_USE(T) { } 74 template <typename T> void V8_USE(T) { }
75 75
76 static void anotherFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o) 76 static void anotherFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o)
77 { 77 {
78 ExceptionState exceptionState(ExceptionState::ExecutionContext, "anotherFunc tion", "TestCustomAccessors", info.Holder(), info.GetIsolate());
78 if (UNLIKELY(info.Length() < 1)) { 79 if (UNLIKELY(info.Length() < 1)) {
79 throwTypeError(ExceptionMessages::failedToExecute("anotherFunction", "Te stCustomAccessors", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 80 throwTypeError(ExceptionMessages::failedToExecute("anotherFunction", "Te stCustomAccessors", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate());
80 return; 81 return;
81 } 82 }
82 TestCustomAccessors* imp = V8TestCustomAccessors::toNative(info.Holder()); 83 TestCustomAccessors* imp = V8TestCustomAccessors::toNative(info.Holder());
83 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 84 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
84 imp->anotherFunction(str); 85 imp->anotherFunction(str);
85 } 86 }
86 87
87 static void anotherFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info) 88 static void anotherFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 fromInternalPointer(object)->deref(); 229 fromInternalPointer(object)->deref();
229 } 230 }
230 231
231 template<> 232 template<>
232 v8::Handle<v8::Value> toV8NoInline(TestCustomAccessors* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 233 v8::Handle<v8::Value> toV8NoInline(TestCustomAccessors* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
233 { 234 {
234 return toV8(impl, creationContext, isolate); 235 return toV8(impl, creationContext, isolate);
235 } 236 }
236 237
237 } // namespace WebCore 238 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698