OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 invokeEventHandler(event, v8::Local<v8::Value>::New(isolate(), jsEvent)); | 70 invokeEventHandler(event, v8::Local<v8::Value>::New(isolate(), jsEvent)); |
71 } | 71 } |
72 | 72 |
73 v8::Local<v8::Value> V8WorkerGlobalScopeEventListener::callListenerFunction(v8::
Handle<v8::Value> jsEvent, Event* event) | 73 v8::Local<v8::Value> V8WorkerGlobalScopeEventListener::callListenerFunction(v8::
Handle<v8::Value> jsEvent, Event* event) |
74 { | 74 { |
75 v8::Local<v8::Function> handlerFunction = getListenerFunction(scriptState()-
>executionContext()); | 75 v8::Local<v8::Function> handlerFunction = getListenerFunction(scriptState()-
>executionContext()); |
76 v8::Local<v8::Object> receiver = getReceiverObject(event); | 76 v8::Local<v8::Object> receiver = getReceiverObject(event); |
77 if (handlerFunction.IsEmpty() || receiver.IsEmpty()) | 77 if (handlerFunction.IsEmpty() || receiver.IsEmpty()) |
78 return v8::Local<v8::Value>(); | 78 return v8::Local<v8::Value>(); |
79 | 79 |
80 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FunctionCall",
"data", devToolsTraceEventData(scriptState()->executionContext(), handlerFuncti
on, isolate())); | 80 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FunctionCall",
"data", devToolsTraceEventData(isolate(), scriptState()->executionContext(), ha
ndlerFunction)); |
81 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); | 81 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); |
82 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 82 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
83 InspectorInstrumentationCookie cookie; | 83 InspectorInstrumentationCookie cookie; |
84 if (InspectorInstrumentation::timelineAgentEnabled(scriptState()->executionC
ontext())) { | 84 if (InspectorInstrumentation::timelineAgentEnabled(scriptState()->executionC
ontext())) { |
85 int scriptId = 0; | 85 int scriptId = 0; |
86 String resourceName; | 86 String resourceName; |
87 int lineNumber = 1; | 87 int lineNumber = 1; |
88 GetDevToolsFunctionInfo(handlerFunction, isolate(), scriptId, resourceNa
me, lineNumber); | 88 GetDevToolsFunctionInfo(handlerFunction, isolate(), scriptId, resourceNa
me, lineNumber); |
89 cookie = InspectorInstrumentation::willCallFunction(scriptState()->execu
tionContext(), scriptId, resourceName, lineNumber); | 89 cookie = InspectorInstrumentation::willCallFunction(scriptState()->execu
tionContext(), scriptId, resourceName, lineNumber); |
90 } | 90 } |
(...skipping 15 matching lines...) Expand all Loading... |
106 return listener; | 106 return listener; |
107 | 107 |
108 EventTarget* target = event->currentTarget(); | 108 EventTarget* target = event->currentTarget(); |
109 v8::Handle<v8::Value> value = toV8(target, scriptState()->context()->Global(
), isolate()); | 109 v8::Handle<v8::Value> value = toV8(target, scriptState()->context()->Global(
), isolate()); |
110 if (value.IsEmpty()) | 110 if (value.IsEmpty()) |
111 return v8::Local<v8::Object>(); | 111 return v8::Local<v8::Object>(); |
112 return v8::Local<v8::Object>::New(isolate(), v8::Handle<v8::Object>::Cast(va
lue)); | 112 return v8::Local<v8::Object>::New(isolate(), v8::Handle<v8::Object>::Cast(va
lue)); |
113 } | 113 } |
114 | 114 |
115 } // namespace blink | 115 } // namespace blink |
OLD | NEW |