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

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

Issue 141523002: Add null-correctness checking to [StrictTypeChecking] methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Last test Created 6 years, 11 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 264 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
265 { 265 {
266 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestSVG", info.Holder(), info.GetIsolate()); 266 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestSVG", info.Holder(), info.GetIsolate());
267 if (UNLIKELY(info.Length() < 2)) { 267 if (UNLIKELY(info.Length() < 2)) {
268 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 268 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
269 exceptionState.throwIfNeeded(); 269 exceptionState.throwIfNeeded();
270 return; 270 return;
271 } 271 }
272 TestSVG* imp = V8TestSVG::toNative(info.Holder()); 272 TestSVG* imp = V8TestSVG::toNative(info.Holder());
273 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) { 273 if (info.Length() > 0 && !info[0]->IsUndefined() && !V8SVGPoint::hasInstance (info[0], info.GetIsolate(), worldType(info.GetIsolate()))) {
274 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); 274 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
275 exceptionState.throwIfNeeded(); 275 exceptionState.throwIfNeeded();
276 return; 276 return;
277 } 277 }
278 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 278 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
279 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState); 279 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState);
280 if (!item) { 280 if (!item) {
281 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); 281 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
282 exceptionState.throwIfNeeded(); 282 exceptionState.throwIfNeeded();
283 return; 283 return;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 fromInternalPointer(object)->deref(); 381 fromInternalPointer(object)->deref();
382 } 382 }
383 383
384 template<> 384 template<>
385 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 385 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
386 { 386 {
387 return toV8(impl, creationContext, isolate); 387 return toV8(impl, creationContext, isolate);
388 } 388 }
389 389
390 } // namespace WebCore 390 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/core/html/canvas/OESVertexArrayObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698