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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 SupportTestInterfaceV8Internal::supplementalMethod1Method(info); | 314 SupportTestInterfaceV8Internal::supplementalMethod1Method(info); |
315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
316 } | 316 } |
317 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 317 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
318 | 318 |
319 #if ENABLE(Condition11) || ENABLE(Condition12) | 319 #if ENABLE(Condition11) || ENABLE(Condition12) |
320 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 320 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
321 { | 321 { |
322 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa
lMethod2", "SupportTestInterface", info.Holder(), info.GetIsolate()); | 322 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa
lMethod2", "SupportTestInterface", info.Holder(), info.GetIsolate()); |
323 if (UNLIKELY(info.Length() < 2)) { | 323 if (UNLIKELY(info.Length() < 2)) { |
324 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())
), info.GetIsolate()); | 324 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 325 exceptionState.throwIfNeeded(); |
325 return; | 326 return; |
326 } | 327 } |
327 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); | 328 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); |
328 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 329 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
329 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); | 330 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); |
330 ExecutionContext* scriptContext = getExecutionContext(); | 331 ExecutionContext* scriptContext = getExecutionContext(); |
331 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc
riptContext, imp, strArg, objArg, exceptionState); | 332 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc
riptContext, imp, strArg, objArg, exceptionState); |
332 if (exceptionState.throwIfNeeded()) | 333 if (exceptionState.throwIfNeeded()) |
333 return; | 334 return; |
334 v8SetReturnValue(info, result.release()); | 335 v8SetReturnValue(info, result.release()); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 fromInternalPointer(object)->deref(); | 510 fromInternalPointer(object)->deref(); |
510 } | 511 } |
511 | 512 |
512 template<> | 513 template<> |
513 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 514 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
514 { | 515 { |
515 return toV8(impl, creationContext, isolate); | 516 return toV8(impl, creationContext, isolate); |
516 } | 517 } |
517 | 518 |
518 } // namespace WebCore | 519 } // namespace WebCore |
OLD | NEW |