Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp

Issue 668673002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/core/v8/V8Binding.cpp ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8Binding.cpp ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698