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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 320 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
321 | 321 |
322 #if ENABLE(Condition11) || ENABLE(Condition12) | 322 #if ENABLE(Condition11) || ENABLE(Condition12) |
323 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 323 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
324 { | 324 { |
325 if (UNLIKELY(info.Length() < 2)) { | 325 if (UNLIKELY(info.Length() < 2)) { |
326 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())
), info.GetIsolate()); | 326 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())
), info.GetIsolate()); |
327 return; | 327 return; |
328 } | 328 } |
329 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); | 329 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); |
330 ExceptionState es(info.GetIsolate()); | 330 ExceptionState es(info.Holder(), info.GetIsolate()); |
331 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 331 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
332 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); | 332 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); |
333 ExecutionContext* scriptContext = getExecutionContext(); | 333 ExecutionContext* scriptContext = getExecutionContext(); |
334 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc
riptContext, imp, strArg, objArg, es); | 334 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc
riptContext, imp, strArg, objArg, es); |
335 if (es.throwIfNeeded()) | 335 if (es.throwIfNeeded()) |
336 return; | 336 return; |
337 v8SetReturnValue(info, result.release()); | 337 v8SetReturnValue(info, result.release()); |
338 } | 338 } |
339 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 339 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
340 | 340 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 V8DOMWrapper::associateObjectWithWrapper<V8SupportTestInterface>(impl, &wrap
perTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 505 V8DOMWrapper::associateObjectWithWrapper<V8SupportTestInterface>(impl, &wrap
perTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
506 return wrapper; | 506 return wrapper; |
507 } | 507 } |
508 | 508 |
509 void V8SupportTestInterface::derefObject(void* object) | 509 void V8SupportTestInterface::derefObject(void* object) |
510 { | 510 { |
511 fromInternalPointer(object)->deref(); | 511 fromInternalPointer(object)->deref(); |
512 } | 512 } |
513 | 513 |
514 } // namespace WebCore | 514 } // namespace WebCore |
OLD | NEW |