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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 Mutex& creationMutex() | 70 Mutex& creationMutex() |
71 { | 71 { |
72 DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, (new Mutex)); | 72 DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, (new Mutex)); |
73 return mutex; | 73 return mutex; |
74 } | 74 } |
75 | 75 |
76 } | 76 } |
77 | 77 |
78 // TODO(Oilpan): avoid keeping a raw reference separate from the | |
79 // owner one; does not enable heap-movable objects. | |
80 MainThreadDebugger* MainThreadDebugger::s_instance = nullptr; | 78 MainThreadDebugger* MainThreadDebugger::s_instance = nullptr; |
81 | 79 |
82 MainThreadDebugger::MainThreadDebugger(v8::Isolate* isolate) | 80 MainThreadDebugger::MainThreadDebugger(v8::Isolate* isolate) |
83 : ThreadDebugger(isolate) | 81 : ThreadDebugger(isolate) |
84 , m_taskRunner(adoptPtr(new InspectorTaskRunner())) | 82 , m_taskRunner(adoptPtr(new InspectorTaskRunner())) |
85 { | 83 { |
86 MutexLocker locker(creationMutex()); | 84 MutexLocker locker(creationMutex()); |
87 ASSERT(!s_instance); | 85 ASSERT(!s_instance); |
88 s_instance = this; | 86 s_instance = this; |
89 } | 87 } |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 return; | 345 return; |
348 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) | 346 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) |
349 return; | 347 return; |
350 } | 348 } |
351 info.GetReturnValue().Set(nodes); | 349 info.GetReturnValue().Set(nodes); |
352 } | 350 } |
353 exceptionState.throwIfNeeded(); | 351 exceptionState.throwIfNeeded(); |
354 } | 352 } |
355 | 353 |
356 } // namespace blink | 354 } // namespace blink |
OLD | NEW |