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

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

Issue 144463014: Add [StrictTypeChecking] to the SVGGeometryElement interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop/change TC; Simplify generated code. Created 6 years, 10 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 | 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 221 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
222 { 222 {
223 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestSVG", info.Holder(), info.GetIsolate()); 223 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestSVG", info.Holder(), info.GetIsolate());
224 if (UNLIKELY(info.Length() < 2)) { 224 if (UNLIKELY(info.Length() < 2)) {
225 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 225 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
226 exceptionState.throwIfNeeded(); 226 exceptionState.throwIfNeeded();
227 return; 227 return;
228 } 228 }
229 TestSVG* imp = V8TestSVG::toNative(info.Holder()); 229 TestSVG* imp = V8TestSVG::toNative(info.Holder());
230 if (info.Length() > 0 && !info[0]->IsUndefined() && !V8SVGPoint::hasInstance (info[0], info.GetIsolate())) { 230 if (info.Length() > 0 && !V8SVGPoint::hasInstance(info[0], info.GetIsolate() )) {
231 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); 231 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
232 exceptionState.throwIfNeeded(); 232 exceptionState.throwIfNeeded();
233 return; 233 return;
234 } 234 }
235 V8TRYCATCH_VOID(SVGPointTearOff*, item, V8SVGPoint::hasInstance(info[0], inf o.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 235 V8TRYCATCH_VOID(SVGPointTearOff*, item, V8SVGPoint::hasInstance(info[0], inf o.GetIsolate()) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
236 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState); 236 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState);
237 RefPtr<SVGPointTearOff> result = imp->strictSVGPointMethod(item, index, exce ptionState); 237 RefPtr<SVGPointTearOff> result = imp->strictSVGPointMethod(item, index, exce ptionState);
238 if (exceptionState.throwIfNeeded()) 238 if (exceptionState.throwIfNeeded())
239 return; 239 return;
240 v8SetReturnValue(info, result.release()); 240 v8SetReturnValue(info, result.release());
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 { 325 {
326 fromInternalPointer(object)->deref(); 326 fromInternalPointer(object)->deref();
327 } 327 }
328 template<> 328 template<>
329 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 329 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
330 { 330 {
331 return toV8(impl, creationContext, isolate); 331 return toV8(impl, creationContext, isolate);
332 } 332 }
333 333
334 } // namespace WebCore 334 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/core/svg/SVGGeometryElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698