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