| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #if ENABLE(Condition1) || ENABLE(Condition2) | 34 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 35 #include "V8TestSerializedScriptValueInterface.h" | 35 #include "V8TestSerializedScriptValueInterface.h" |
| 36 | 36 |
| 37 #include "RuntimeEnabledFeatures.h" | 37 #include "RuntimeEnabledFeatures.h" |
| 38 #include "bindings/v8/ExceptionMessages.h" |
| 39 #include "bindings/v8/ExceptionState.h" |
| 38 #include "bindings/v8/ScriptController.h" | 40 #include "bindings/v8/ScriptController.h" |
| 39 #include "bindings/v8/ScriptState.h" | 41 #include "bindings/v8/ScriptState.h" |
| 40 #include "bindings/v8/ScriptValue.h" | 42 #include "bindings/v8/ScriptValue.h" |
| 41 #include "bindings/v8/SerializedScriptValue.h" | 43 #include "bindings/v8/SerializedScriptValue.h" |
| 42 #include "bindings/v8/V8Binding.h" | 44 #include "bindings/v8/V8Binding.h" |
| 43 #include "bindings/v8/V8DOMConfiguration.h" | 45 #include "bindings/v8/V8DOMConfiguration.h" |
| 44 #include "bindings/v8/V8DOMWrapper.h" | 46 #include "bindings/v8/V8DOMWrapper.h" |
| 45 #include "core/dom/ContextFeatures.h" | 47 #include "core/dom/ContextFeatures.h" |
| 46 #include "core/dom/Document.h" | 48 #include "core/dom/Document.h" |
| 47 #include "platform/TraceEvent.h" | 49 #include "platform/TraceEvent.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 85 |
| 84 static void valueAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 86 static void valueAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 85 { | 87 { |
| 86 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 87 TestSerializedScriptValueInterfaceV8Internal::valueAttributeGetter(info); | 89 TestSerializedScriptValueInterfaceV8Internal::valueAttributeGetter(info); |
| 88 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 89 } | 91 } |
| 90 | 92 |
| 91 static void valueAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Propert
yCallbackInfo<void>& info) | 93 static void valueAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Propert
yCallbackInfo<void>& info) |
| 92 { | 94 { |
| 95 ExceptionState exceptionState(ExceptionState::SetterContext, "value", "TestS
erializedScriptValueInterface", info.Holder(), info.GetIsolate()); |
| 93 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); | 96 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); |
| 94 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(jsValue, info.GetIsolate())); | 97 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(jsValue, info.GetIsolate())); |
| 95 imp->setValue(WTF::getPtr(cppValue)); | 98 imp->setValue(WTF::getPtr(cppValue)); |
| 96 } | 99 } |
| 97 | 100 |
| 98 static void valueAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 101 static void valueAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 99 { | 102 { |
| 100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 101 TestSerializedScriptValueInterfaceV8Internal::valueAttributeSetter(jsValue,
info); | 104 TestSerializedScriptValueInterfaceV8Internal::valueAttributeSetter(jsValue,
info); |
| 102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 137 |
| 135 static void dirtySerializedValueAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 138 static void dirtySerializedValueAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 136 { | 139 { |
| 137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 138 TestSerializedScriptValueInterfaceV8Internal::dirtySerializedValueAttributeG
etter(info); | 141 TestSerializedScriptValueInterfaceV8Internal::dirtySerializedValueAttributeG
etter(info); |
| 139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 140 } | 143 } |
| 141 | 144 |
| 142 static void dirtySerializedValueAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 145 static void dirtySerializedValueAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
| 143 { | 146 { |
| 147 ExceptionState exceptionState(ExceptionState::SetterContext, "dirtySerialize
dValue", "TestSerializedScriptValueInterface", info.Holder(), info.GetIsolate())
; |
| 144 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); | 148 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); |
| 145 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(jsValue, info.GetIsolate())); | 149 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(jsValue, info.GetIsolate())); |
| 146 imp->setDirtySerializedValue(WTF::getPtr(cppValue)); | 150 imp->setDirtySerializedValue(WTF::getPtr(cppValue)); |
| 147 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(),
"dirtySerializedValue", v8::String::kInternalizedString)); // Invalidate the cac
hed value. | 151 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(),
"dirtySerializedValue", v8::String::kInternalizedString)); // Invalidate the cac
hed value. |
| 148 } | 152 } |
| 149 | 153 |
| 150 static void dirtySerializedValueAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 154 static void dirtySerializedValueAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 151 { | 155 { |
| 152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 153 TestSerializedScriptValueInterfaceV8Internal::dirtySerializedValueAttributeS
etter(jsValue, info); | 157 TestSerializedScriptValueInterfaceV8Internal::dirtySerializedValueAttributeS
etter(jsValue, info); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 172 | 176 |
| 173 static void dirtyScriptValueAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 177 static void dirtyScriptValueAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 174 { | 178 { |
| 175 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 176 TestSerializedScriptValueInterfaceV8Internal::dirtyScriptValueAttributeGette
r(info); | 180 TestSerializedScriptValueInterfaceV8Internal::dirtyScriptValueAttributeGette
r(info); |
| 177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 178 } | 182 } |
| 179 | 183 |
| 180 static void dirtyScriptValueAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 184 static void dirtyScriptValueAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
| 181 { | 185 { |
| 186 ExceptionState exceptionState(ExceptionState::SetterContext, "dirtyScriptVal
ue", "TestSerializedScriptValueInterface", info.Holder(), info.GetIsolate()); |
| 182 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); | 187 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); |
| 183 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 188 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); |
| 184 imp->setDirtyScriptValue(cppValue); | 189 imp->setDirtyScriptValue(cppValue); |
| 185 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(),
"dirtyScriptValue", v8::String::kInternalizedString)); // Invalidate the cached
value. | 190 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(),
"dirtyScriptValue", v8::String::kInternalizedString)); // Invalidate the cached
value. |
| 186 } | 191 } |
| 187 | 192 |
| 188 static void dirtyScriptValueAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 193 static void dirtyScriptValueAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 189 { | 194 { |
| 190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 191 TestSerializedScriptValueInterfaceV8Internal::dirtyScriptValueAttributeSette
r(jsValue, info); | 196 TestSerializedScriptValueInterfaceV8Internal::dirtyScriptValueAttributeSette
r(jsValue, info); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 215 | 220 |
| 216 static void cachedValueCallWithAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 221 static void cachedValueCallWithAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 217 { | 222 { |
| 218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 219 TestSerializedScriptValueInterfaceV8Internal::cachedValueCallWithAttributeGe
tter(info); | 224 TestSerializedScriptValueInterfaceV8Internal::cachedValueCallWithAttributeGe
tter(info); |
| 220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 221 } | 226 } |
| 222 | 227 |
| 223 static void cachedValueCallWithAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 228 static void cachedValueCallWithAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
| 224 { | 229 { |
| 230 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedValueCal
lWith", "TestSerializedScriptValueInterface", info.Holder(), info.GetIsolate()); |
| 225 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); | 231 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterfa
ce::toNative(info.Holder()); |
| 226 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(jsValue, info.GetIsolate())); | 232 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(jsValue, info.GetIsolate())); |
| 227 ScriptState* currentState = ScriptState::current(); | 233 ScriptState* currentState = ScriptState::current(); |
| 228 if (!currentState) | 234 if (!currentState) |
| 229 return; | 235 return; |
| 230 ScriptState& state = *currentState; | 236 ScriptState& state = *currentState; |
| 231 imp->setCachedValueCallWith(&state, WTF::getPtr(cppValue)); | 237 imp->setCachedValueCallWith(&state, WTF::getPtr(cppValue)); |
| 232 if (state.hadException()) | 238 if (state.hadException()) |
| 233 throwError(state.exception(), info.GetIsolate()); | 239 throwError(state.exception(), info.GetIsolate()); |
| 234 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(),
"cachedValueCallWith", v8::String::kInternalizedString)); // Invalidate the cach
ed value. | 240 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(),
"cachedValueCallWith", v8::String::kInternalizedString)); // Invalidate the cach
ed value. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 331 } |
| 326 | 332 |
| 327 template<> | 333 template<> |
| 328 v8::Handle<v8::Value> toV8NoInline(TestSerializedScriptValueInterface* impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) | 334 v8::Handle<v8::Value> toV8NoInline(TestSerializedScriptValueInterface* impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 329 { | 335 { |
| 330 return toV8(impl, creationContext, isolate); | 336 return toV8(impl, creationContext, isolate); |
| 331 } | 337 } |
| 332 | 338 |
| 333 } // namespace WebCore | 339 } // namespace WebCore |
| 334 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 340 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| OLD | NEW |