| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro attribute_getter(attribute, world_suffix) %} | 2 {% macro attribute_getter(attribute, world_suffix) %} |
| 3 {% filter conditional(attribute.conditional_string) %} | 3 {% filter conditional(attribute.conditional_string) %} |
| 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
| 5 {%- if attribute.is_expose_js_accessors %} | 5 {%- if attribute.is_expose_js_accessors %} |
| 6 const v8::FunctionCallbackInfo<v8::Value>& info | 6 const v8::FunctionCallbackInfo<v8::Value>& info |
| 7 {%- else %} | 7 {%- else %} |
| 8 const v8::PropertyCallbackInfo<v8::Value>& info | 8 const v8::PropertyCallbackInfo<v8::Value>& info |
| 9 {%- endif %}) | 9 {%- endif %}) |
| 10 { | 10 { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 if (!scriptState->executionContext()) | 354 if (!scriptState->executionContext()) |
| 355 return false; | 355 return false; |
| 356 | 356 |
| 357 ScriptState::Scope scope(scriptState); | 357 ScriptState::Scope scope(scriptState); |
| 358 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 358 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 359 | 359 |
| 360 ExceptionState exceptionState(ExceptionState::GetterContext, "{{attribute.na
me}}", "{{cpp_class}}", scriptState->context()->Global(), scriptState->isolate()
); | 360 ExceptionState exceptionState(ExceptionState::GetterContext, "{{attribute.na
me}}", "{{cpp_class}}", scriptState->context()->Global(), scriptState->isolate()
); |
| 361 v8::TryCatch block; | 361 v8::TryCatch block; |
| 362 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "{{cpp_class}}", "{{attribute.name}}", holder); | 362 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "{{cpp_class}}", "{{attribute.name}}", holder); |
| 363 if (block.HasCaught()) { | 363 if (block.HasCaught()) { |
| 364 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 364 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
| 365 // FIXME: We should support more exceptions. | 365 // FIXME: We should support more exceptions. |
| 366 RELEASE_ASSERT_NOT_REACHED(); | 366 RELEASE_ASSERT_NOT_REACHED(); |
| 367 } | 367 } |
| 368 block.ReThrow(); | 368 block.ReThrow(); |
| 369 return false; | 369 return false; |
| 370 } | 370 } |
| 371 {{attribute.private_script_v8_value_to_local_cpp_value}}; | 371 {{attribute.private_script_v8_value_to_local_cpp_value}}; |
| 372 RELEASE_ASSERT(!exceptionState.hadException()); | 372 RELEASE_ASSERT(!exceptionState.hadException()); |
| 373 *result = cppValue; | 373 *result = cppValue; |
| 374 return true; | 374 return true; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 390 if (!scriptState->executionContext()) | 390 if (!scriptState->executionContext()) |
| 391 return false; | 391 return false; |
| 392 | 392 |
| 393 ScriptState::Scope scope(scriptState); | 393 ScriptState::Scope scope(scriptState); |
| 394 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 394 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 395 | 395 |
| 396 ExceptionState exceptionState(ExceptionState::SetterContext, "{{attribute.na
me}}", "{{cpp_class}}", scriptState->context()->Global(), scriptState->isolate()
); | 396 ExceptionState exceptionState(ExceptionState::SetterContext, "{{attribute.na
me}}", "{{cpp_class}}", scriptState->context()->Global(), scriptState->isolate()
); |
| 397 v8::TryCatch block; | 397 v8::TryCatch block; |
| 398 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "{{cpp_class}}", "{{
attribute.name}}", holder, {{attribute.private_script_cpp_value_to_v8_value}}); | 398 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "{{cpp_class}}", "{{
attribute.name}}", holder, {{attribute.private_script_cpp_value_to_v8_value}}); |
| 399 if (block.HasCaught()) { | 399 if (block.HasCaught()) { |
| 400 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip
tState->isolate(), exceptionState, block.Exception())) { | 400 if (!PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->i
solate(), exceptionState, block)) { |
| 401 // FIXME: We should support more exceptions. | 401 // FIXME: We should support more exceptions. |
| 402 RELEASE_ASSERT_NOT_REACHED(); | 402 RELEASE_ASSERT_NOT_REACHED(); |
| 403 } | 403 } |
| 404 block.ReThrow(); | 404 block.ReThrow(); |
| 405 return false; | 405 return false; |
| 406 } | 406 } |
| 407 return true; | 407 return true; |
| 408 } | 408 } |
| 409 {% endmacro %} | 409 {% endmacro %} |
| OLD | NEW |