| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "core/xml/XPathResult.h" | 66 #include "core/xml/XPathResult.h" |
| 67 #include "platform/UserGestureIndicator.h" | 67 #include "platform/UserGestureIndicator.h" |
| 68 #include "platform/wtf/PtrUtil.h" | 68 #include "platform/wtf/PtrUtil.h" |
| 69 #include "platform/wtf/ThreadingPrimitives.h" | 69 #include "platform/wtf/ThreadingPrimitives.h" |
| 70 #include "platform/wtf/text/StringBuilder.h" | 70 #include "platform/wtf/text/StringBuilder.h" |
| 71 | 71 |
| 72 namespace blink { | 72 namespace blink { |
| 73 | 73 |
| 74 namespace { | 74 namespace { |
| 75 | 75 |
| 76 int FrameId(LocalFrame* frame) { | 76 int FrameId(LocalFrame& frame) { |
| 77 ASSERT(frame); | 77 return WeakIdentifierMap<LocalFrame>::Identifier(&frame); |
| 78 return WeakIdentifierMap<LocalFrame>::Identifier(frame); | |
| 79 } | 78 } |
| 80 | 79 |
| 81 Mutex& CreationMutex() { | 80 Mutex& CreationMutex() { |
| 82 DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, (new Mutex)); | 81 DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, (new Mutex)); |
| 83 return mutex; | 82 return mutex; |
| 84 } | 83 } |
| 85 | 84 |
| 86 LocalFrame* ToFrame(ExecutionContext* context) { | 85 LocalFrame* ToFrame(ExecutionContext* context) { |
| 87 if (!context) | 86 if (!context) |
| 88 return nullptr; | 87 return nullptr; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 GetV8Inspector()->exceptionThrown( | 207 GetV8Inspector()->exceptionThrown( |
| 209 script_state->GetContext(), ToV8InspectorStringView(default_message), | 208 script_state->GetContext(), ToV8InspectorStringView(default_message), |
| 210 exception, ToV8InspectorStringView(message), | 209 exception, ToV8InspectorStringView(message), |
| 211 ToV8InspectorStringView(url), location->LineNumber(), | 210 ToV8InspectorStringView(url), location->LineNumber(), |
| 212 location->ColumnNumber(), location->TakeStackTrace(), | 211 location->ColumnNumber(), location->TakeStackTrace(), |
| 213 location->ScriptId()); | 212 location->ScriptId()); |
| 214 } | 213 } |
| 215 } | 214 } |
| 216 | 215 |
| 217 int MainThreadDebugger::ContextGroupId(LocalFrame* frame) { | 216 int MainThreadDebugger::ContextGroupId(LocalFrame* frame) { |
| 218 LocalFrame* local_frame_root = frame->LocalFrameRoot(); | 217 LocalFrame& local_frame_root = frame->LocalFrameRoot(); |
| 219 return FrameId(local_frame_root); | 218 return FrameId(local_frame_root); |
| 220 } | 219 } |
| 221 | 220 |
| 222 MainThreadDebugger* MainThreadDebugger::Instance() { | 221 MainThreadDebugger* MainThreadDebugger::Instance() { |
| 223 DCHECK(IsMainThread()); | 222 DCHECK(IsMainThread()); |
| 224 ThreadDebugger* debugger = | 223 ThreadDebugger* debugger = |
| 225 ThreadDebugger::From(V8PerIsolateData::MainThreadIsolate()); | 224 ThreadDebugger::From(V8PerIsolateData::MainThreadIsolate()); |
| 226 DCHECK(debugger && !debugger->IsWorker()); | 225 DCHECK(debugger && !debugger->IsWorker()); |
| 227 return static_cast<MainThreadDebugger*>(debugger); | 226 return static_cast<MainThreadDebugger*>(debugger); |
| 228 } | 227 } |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 context, nodes, index++, | 464 context, nodes, index++, |
| 466 ToV8(node, info.Holder(), info.GetIsolate())) | 465 ToV8(node, info.Holder(), info.GetIsolate())) |
| 467 .FromMaybe(false)) | 466 .FromMaybe(false)) |
| 468 return; | 467 return; |
| 469 } | 468 } |
| 470 info.GetReturnValue().Set(nodes); | 469 info.GetReturnValue().Set(nodes); |
| 471 } | 470 } |
| 472 } | 471 } |
| 473 | 472 |
| 474 } // namespace blink | 473 } // namespace blink |
| OLD | NEW |