| OLD | NEW |
| 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 Loading... |
| 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 && (isUndefinedOrNull(info[0]) || !V8SVGPoint::hasInst
ance(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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 fromInternalPointer(object)->deref(); | 326 fromInternalPointer(object)->deref(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 template<> | 329 template<> |
| 330 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 330 v8::Handle<v8::Value> toV8NoInline(TestSVG* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
| 331 { | 331 { |
| 332 return toV8(impl, creationContext, isolate); | 332 return toV8(impl, creationContext, isolate); |
| 333 } | 333 } |
| 334 | 334 |
| 335 } // namespace WebCore | 335 } // namespace WebCore |
| OLD | NEW |