| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 namespace WebCore { | 67 namespace WebCore { |
| 68 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod
s, 0, WrapperTypeObjectPrototype }; | 68 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod
s, 0, WrapperTypeObjectPrototype }; |
| 69 | 69 |
| 70 namespace TestInterfaceConstructorV8Internal { | 70 namespace TestInterfaceConstructorV8Internal { |
| 71 | 71 |
| 72 template <typename T> void V8_USE(T) { } | 72 template <typename T> void V8_USE(T) { } |
| 73 | 73 |
| 74 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 74 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 75 { | 75 { |
| 76 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 76 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 77 ExecutionContext* context = getExecutionContext(); | 77 ExecutionContext* context = getExecutionContext(); |
| 78 Document& document = *toDocument(getExecutionContext()); | 78 Document& document = *toDocument(getExecutionContext()); |
| 79 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con
text, document, exceptionState); | 79 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con
text, document, exceptionState); |
| 80 v8::Handle<v8::Object> wrapper = info.Holder(); | 80 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 81 if (exceptionState.throwIfNeeded()) | 81 if (exceptionState.throwIfNeeded()) |
| 82 return; | 82 return; |
| 83 | 83 |
| 84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(
), WrapperConfiguration::Dependent); | 84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(
), WrapperConfiguration::Dependent); |
| 85 v8SetReturnValue(info, wrapper); | 85 v8SetReturnValue(info, wrapper); |
| 86 } | 86 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 fromInternalPointer(object)->deref(); | 176 fromInternalPointer(object)->deref(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 template<> | 179 template<> |
| 180 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 180 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
| 181 { | 181 { |
| 182 return toV8(impl, creationContext, isolate); | 182 return toV8(impl, creationContext, isolate); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace WebCore | 185 } // namespace WebCore |
| OLD | NEW |