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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 111 static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
112 { | 112 { |
113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
114 TestNodeV8Internal::hrefThrowsAttributeGetter(info); | 114 TestNodeV8Internal::hrefThrowsAttributeGetter(info); |
115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
116 } | 116 } |
117 | 117 |
118 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 118 static void hrefThrowsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
119 { | 119 { |
| 120 ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "
TestNode", info.Holder(), info.GetIsolate()); |
120 TestNode* imp = V8TestNode::toNative(info.Holder()); | 121 TestNode* imp = V8TestNode::toNative(info.Holder()); |
121 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 122 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
122 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | |
123 imp->setHrefThrows(cppValue, exceptionState); | 123 imp->setHrefThrows(cppValue, exceptionState); |
124 exceptionState.throwIfNeeded(); | 124 exceptionState.throwIfNeeded(); |
125 } | 125 } |
126 | 126 |
127 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 127 static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
128 { | 128 { |
129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
130 TestNodeV8Internal::hrefThrowsAttributeSetter(jsValue, info); | 130 TestNodeV8Internal::hrefThrowsAttributeSetter(jsValue, info); |
131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
132 } | 132 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 fromInternalPointer(object)->deref(); | 244 fromInternalPointer(object)->deref(); |
245 } | 245 } |
246 | 246 |
247 template<> | 247 template<> |
248 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) | 248 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) |
249 { | 249 { |
250 return toV8(impl, creationContext, isolate); | 250 return toV8(impl, creationContext, isolate); |
251 } | 251 } |
252 | 252 |
253 } // namespace WebCore | 253 } // namespace WebCore |
OLD | NEW |