| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 v8::Handle<v8::Object> receiver = toV8(element, context->Global(), isolate).
As<v8::Object>(); | 212 v8::Handle<v8::Object> receiver = toV8(element, context->Global(), isolate).
As<v8::Object>(); |
| 213 ASSERT(!receiver.IsEmpty()); | 213 ASSERT(!receiver.IsEmpty()); |
| 214 | 214 |
| 215 v8::Handle<v8::Function> callback = m_attributeChanged.newLocal(isolate); | 215 v8::Handle<v8::Function> callback = m_attributeChanged.newLocal(isolate); |
| 216 if (callback.IsEmpty()) | 216 if (callback.IsEmpty()) |
| 217 return; | 217 return; |
| 218 | 218 |
| 219 v8::Handle<v8::Value> argv[] = { | 219 v8::Handle<v8::Value> argv[] = { |
| 220 v8String(name, isolate), | 220 v8String(name, isolate), |
| 221 oldValue.isNull() ? v8::Handle<v8::Value>(v8::Null()) : v8::Handle<v8::V
alue>(v8String(oldValue, isolate)), | 221 oldValue.isNull() ? v8::Handle<v8::Value>(v8::Null(isolate)) : v8::Handl
e<v8::Value>(v8String(oldValue, isolate)), |
| 222 newValue.isNull() ? v8::Handle<v8::Value>(v8::Null()) : v8::Handle<v8::V
alue>(v8String(newValue, isolate)) | 222 newValue.isNull() ? v8::Handle<v8::Value>(v8::Null(isolate)) : v8::Handl
e<v8::Value>(v8String(newValue, isolate)) |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 v8::TryCatch exceptionCatcher; | 225 v8::TryCatch exceptionCatcher; |
| 226 exceptionCatcher.SetVerbose(true); | 226 exceptionCatcher.SetVerbose(true); |
| 227 ScriptController::callFunctionWithInstrumentation(scriptExecutionContext(),
callback, receiver, WTF_ARRAY_LENGTH(argv), argv, isolate); | 227 ScriptController::callFunctionWithInstrumentation(scriptExecutionContext(),
callback, receiver, WTF_ARRAY_LENGTH(argv), argv, isolate); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void V8CustomElementLifecycleCallbacks::call(const ScopedPersistent<v8::Function
>& weakCallback, Element* element) | 230 void V8CustomElementLifecycleCallbacks::call(const ScopedPersistent<v8::Function
>& weakCallback, Element* element) |
| 231 { | 231 { |
| 232 if (!canInvokeCallback()) | 232 if (!canInvokeCallback()) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 246 | 246 |
| 247 v8::Handle<v8::Object> receiver = toV8(element, context->Global(), isolate).
As<v8::Object>(); | 247 v8::Handle<v8::Object> receiver = toV8(element, context->Global(), isolate).
As<v8::Object>(); |
| 248 ASSERT(!receiver.IsEmpty()); | 248 ASSERT(!receiver.IsEmpty()); |
| 249 | 249 |
| 250 v8::TryCatch exceptionCatcher; | 250 v8::TryCatch exceptionCatcher; |
| 251 exceptionCatcher.SetVerbose(true); | 251 exceptionCatcher.SetVerbose(true); |
| 252 ScriptController::callFunctionWithInstrumentation(scriptExecutionContext(),
callback, receiver, 0, 0, isolate); | 252 ScriptController::callFunctionWithInstrumentation(scriptExecutionContext(),
callback, receiver, 0, 0, isolate); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace WebCore | 255 } // namespace WebCore |
| OLD | NEW |