OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 : SuspendableTimer(window.document()) | 121 : SuspendableTimer(window.document()) |
122 , m_window(window) | 122 , m_window(window) |
123 , m_message(message) | 123 , m_message(message) |
124 , m_origin(sourceOrigin) | 124 , m_origin(sourceOrigin) |
125 , m_source(source) | 125 , m_source(source) |
126 , m_channels(channels) | 126 , m_channels(channels) |
127 , m_targetOrigin(targetOrigin) | 127 , m_targetOrigin(targetOrigin) |
128 , m_stackTrace(stackTrace) | 128 , m_stackTrace(stackTrace) |
129 , m_userGestureToken(userGestureToken) | 129 , m_userGestureToken(userGestureToken) |
130 { | 130 { |
131 m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarti ng(executionContext(), "postMessage"); | |
yurys
2014/07/21 12:45:32
If we are OK with storing async id in the instrume
aandrey
2014/07/22 11:08:43
Yes, something like ExecutionContextTask/FileSyste
| |
131 } | 132 } |
132 | 133 |
133 PassRefPtrWillBeRawPtr<MessageEvent> event() | 134 PassRefPtrWillBeRawPtr<MessageEvent> event() |
134 { | 135 { |
135 return MessageEvent::create(m_channels.release(), m_message, m_origin, S tring(), m_source.get()); | 136 return MessageEvent::create(m_channels.release(), m_message, m_origin, S tring(), m_source.get()); |
136 | 137 |
137 } | 138 } |
138 SecurityOrigin* targetOrigin() const { return m_targetOrigin.get(); } | 139 SecurityOrigin* targetOrigin() const { return m_targetOrigin.get(); } |
139 ScriptCallStack* stackTrace() const { return m_stackTrace.get(); } | 140 ScriptCallStack* stackTrace() const { return m_stackTrace.get(); } |
140 UserGestureToken* userGestureToken() const { return m_userGestureToken.get() ; } | 141 UserGestureToken* userGestureToken() const { return m_userGestureToken.get() ; } |
141 | 142 |
142 private: | 143 private: |
143 virtual void fired() OVERRIDE | 144 virtual void fired() OVERRIDE |
144 { | 145 { |
146 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceA syncOperationCompletedCallbackStarting(executionContext(), m_asyncOperationId); | |
yurys
2014/07/21 12:45:32
Why do you need to merge two hooks into one?
aandrey
2014/07/22 11:08:43
To have only one instrumentation call here. Actual
yurys
2014/07/22 13:09:43
Why is it marked as completed only here? Shouldn't
aandrey
2014/07/22 13:32:14
No, it's on the right place.
The async operation "
| |
145 m_window->postMessageTimerFired(adoptPtr(this)); | 147 m_window->postMessageTimerFired(adoptPtr(this)); |
146 // This object is deleted now. | 148 // This object is deleted now. |
149 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); | |
147 } | 150 } |
148 | 151 |
149 RefPtrWillBePersistent<LocalDOMWindow> m_window; | 152 RefPtrWillBePersistent<LocalDOMWindow> m_window; |
150 RefPtr<SerializedScriptValue> m_message; | 153 RefPtr<SerializedScriptValue> m_message; |
151 String m_origin; | 154 String m_origin; |
152 RefPtrWillBePersistent<LocalDOMWindow> m_source; | 155 RefPtrWillBePersistent<LocalDOMWindow> m_source; |
153 OwnPtr<MessagePortChannelArray> m_channels; | 156 OwnPtr<MessagePortChannelArray> m_channels; |
154 RefPtr<SecurityOrigin> m_targetOrigin; | 157 RefPtr<SecurityOrigin> m_targetOrigin; |
155 RefPtrWillBePersistent<ScriptCallStack> m_stackTrace; | 158 RefPtrWillBePersistent<ScriptCallStack> m_stackTrace; |
156 RefPtr<UserGestureToken> m_userGestureToken; | 159 RefPtr<UserGestureToken> m_userGestureToken; |
160 int m_asyncOperationId; | |
157 }; | 161 }; |
158 | 162 |
159 static void disableSuddenTermination() | 163 static void disableSuddenTermination() |
160 { | 164 { |
161 blink::Platform::current()->suddenTerminationChanged(false); | 165 blink::Platform::current()->suddenTerminationChanged(false); |
162 } | 166 } |
163 | 167 |
164 static void enableSuddenTermination() | 168 static void enableSuddenTermination() |
165 { | 169 { |
166 blink::Platform::current()->suddenTerminationChanged(true); | 170 blink::Platform::current()->suddenTerminationChanged(true); |
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1942 visitor->trace(m_localStorage); | 1946 visitor->trace(m_localStorage); |
1943 visitor->trace(m_applicationCache); | 1947 visitor->trace(m_applicationCache); |
1944 visitor->trace(m_performance); | 1948 visitor->trace(m_performance); |
1945 visitor->trace(m_css); | 1949 visitor->trace(m_css); |
1946 visitor->trace(m_eventQueue); | 1950 visitor->trace(m_eventQueue); |
1947 WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor); | 1951 WillBeHeapSupplementable<LocalDOMWindow>::trace(visitor); |
1948 EventTargetWithInlineData::trace(visitor); | 1952 EventTargetWithInlineData::trace(visitor); |
1949 } | 1953 } |
1950 | 1954 |
1951 } // namespace blink | 1955 } // namespace blink |
OLD | NEW |