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

Side by Side Diff: sky/engine/bindings/core/v8/V8Binding.cpp

Issue 889823002: Remove TRACE_EVENT indirection through blink::Platform (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/bindings/core/v8/V8Binding.h ('k') | sky/engine/bindings/core/v8/V8GCController.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 25 matching lines...) Expand all
36 #include "sky/engine/bindings/core/v8/ScriptController.h" 36 #include "sky/engine/bindings/core/v8/ScriptController.h"
37 #include "sky/engine/bindings/core/v8/V8AbstractEventListener.h" 37 #include "sky/engine/bindings/core/v8/V8AbstractEventListener.h"
38 #include "sky/engine/bindings/core/v8/V8BindingMacros.h" 38 #include "sky/engine/bindings/core/v8/V8BindingMacros.h"
39 #include "sky/engine/bindings/core/v8/V8ObjectConstructor.h" 39 #include "sky/engine/bindings/core/v8/V8ObjectConstructor.h"
40 #include "sky/engine/bindings/core/v8/WindowProxy.h" 40 #include "sky/engine/bindings/core/v8/WindowProxy.h"
41 #include "sky/engine/core/dom/Document.h" 41 #include "sky/engine/core/dom/Document.h"
42 #include "sky/engine/core/dom/Element.h" 42 #include "sky/engine/core/dom/Element.h"
43 #include "sky/engine/core/dom/QualifiedName.h" 43 #include "sky/engine/core/dom/QualifiedName.h"
44 #include "sky/engine/core/frame/LocalFrame.h" 44 #include "sky/engine/core/frame/LocalFrame.h"
45 #include "sky/engine/core/frame/Settings.h" 45 #include "sky/engine/core/frame/Settings.h"
46 #include "sky/engine/core/inspector/InspectorTraceEvents.h"
47 #include "sky/engine/core/loader/FrameLoaderClient.h" 46 #include "sky/engine/core/loader/FrameLoaderClient.h"
48 #include "sky/engine/platform/EventTracer.h"
49 #include "sky/engine/platform/JSONValues.h" 47 #include "sky/engine/platform/JSONValues.h"
50 #include "sky/engine/wtf/ArrayBufferContents.h" 48 #include "sky/engine/wtf/ArrayBufferContents.h"
51 #include "sky/engine/wtf/MainThread.h" 49 #include "sky/engine/wtf/MainThread.h"
52 #include "sky/engine/wtf/MathExtras.h" 50 #include "sky/engine/wtf/MathExtras.h"
53 #include "sky/engine/wtf/StdLibExtras.h" 51 #include "sky/engine/wtf/StdLibExtras.h"
54 #include "sky/engine/wtf/Threading.h" 52 #include "sky/engine/wtf/Threading.h"
55 #include "sky/engine/wtf/text/AtomicString.h" 53 #include "sky/engine/wtf/text/AtomicString.h"
56 #include "sky/engine/wtf/text/CString.h" 54 #include "sky/engine/wtf/text/CString.h"
57 #include "sky/engine/wtf/text/StringBuffer.h" 55 #include "sky/engine/wtf/text/StringBuffer.h"
58 #include "sky/engine/wtf/text/StringHash.h" 56 #include "sky/engine/wtf/text/StringHash.h"
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 ScriptState* V8TestingScope::scriptState() const 827 ScriptState* V8TestingScope::scriptState() const
830 { 828 {
831 return m_scriptState.get(); 829 return m_scriptState.get();
832 } 830 }
833 831
834 v8::Isolate* V8TestingScope::isolate() const 832 v8::Isolate* V8TestingScope::isolate() const
835 { 833 {
836 return m_scriptState->isolate(); 834 return m_scriptState->isolate();
837 } 835 }
838 836
839 void GetDevToolsFunctionInfo(v8::Handle<v8::Function> function, v8::Isolate* iso late, int& scriptId, String& resourceName, int& lineNumber)
840 {
841 v8::Handle<v8::Function> originalFunction = getBoundFunction(function);
842 scriptId = originalFunction->ScriptId();
843 v8::ScriptOrigin origin = originalFunction->GetScriptOrigin();
844 if (!origin.ResourceName().IsEmpty()) {
845 resourceName = NativeValueTraits<String>::nativeValue(origin.ResourceNam e(), isolate);
846 lineNumber = originalFunction->GetScriptLineNumber() + 1;
847 }
848 if (resourceName.isEmpty()) {
849 resourceName = "undefined";
850 lineNumber = 1;
851 }
852 }
853
854 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate)
855 {
856 int scriptId = 0;
857 String resourceName;
858 int lineNumber = 1;
859 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe r);
860 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin eNumber);
861 }
862
863 } // namespace blink 837 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/bindings/core/v8/V8Binding.h ('k') | sky/engine/bindings/core/v8/V8GCController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698