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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 , m_workerThread(workerThread) | 54 , m_workerThread(workerThread) |
55 { | 55 { |
56 } | 56 } |
57 | 57 |
58 WorkerThreadDebugger::~WorkerThreadDebugger() | 58 WorkerThreadDebugger::~WorkerThreadDebugger() |
59 { | 59 { |
60 } | 60 } |
61 | 61 |
62 void WorkerThreadDebugger::contextCreated(v8::Local<v8::Context> context) | 62 void WorkerThreadDebugger::contextCreated(v8::Local<v8::Context> context) |
63 { | 63 { |
64 debugger()->contextCreated(V8ContextInfo(context, workerContextGroupId, true
, m_workerThread->workerGlobalScope()->url().getString(), "", "")); | 64 debugger()->contextCreated(V8ContextInfo(context, workerContextGroupId, true
, m_workerThread->workerGlobalScope()->url().getString(), "", "", false)); |
65 } | 65 } |
66 | 66 |
67 void WorkerThreadDebugger::contextWillBeDestroyed(v8::Local<v8::Context> context
) | 67 void WorkerThreadDebugger::contextWillBeDestroyed(v8::Local<v8::Context> context
) |
68 { | 68 { |
69 debugger()->contextDestroyed(context); | 69 debugger()->contextDestroyed(context); |
70 } | 70 } |
71 | 71 |
72 int WorkerThreadDebugger::contextGroupId() | 72 int WorkerThreadDebugger::contextGroupId() |
73 { | 73 { |
74 return workerContextGroupId; | 74 return workerContextGroupId; |
(...skipping 18 matching lines...) Expand all Loading... |
93 int WorkerThreadDebugger::ensureDefaultContextInGroup(int contextGroupId) | 93 int WorkerThreadDebugger::ensureDefaultContextInGroup(int contextGroupId) |
94 { | 94 { |
95 ASSERT(contextGroupId == workerContextGroupId); | 95 ASSERT(contextGroupId == workerContextGroupId); |
96 ScriptState* scriptState = m_workerThread->workerGlobalScope()->scriptContro
ller()->getScriptState(); | 96 ScriptState* scriptState = m_workerThread->workerGlobalScope()->scriptContro
ller()->getScriptState(); |
97 if (!scriptState) | 97 if (!scriptState) |
98 return 0; | 98 return 0; |
99 v8::HandleScope scopes(scriptState->isolate()); | 99 v8::HandleScope scopes(scriptState->isolate()); |
100 return V8Debugger::contextId(scriptState->context()); | 100 return V8Debugger::contextId(scriptState->context()); |
101 } | 101 } |
102 | 102 |
| 103 void WorkerThreadDebugger::reportMessageToConsole(v8::Local<v8::Context> context
, ConsoleMessage* message) |
| 104 { |
| 105 ExecutionContext* executionContext = toExecutionContext(context); |
| 106 ASSERT(executionContext->isWorkerGlobalScope()); |
| 107 executionContext->addConsoleMessage(message); |
| 108 } |
| 109 |
| 110 v8::MaybeLocal<v8::Value> WorkerThreadDebugger::memoryInfo(v8::Isolate*, v8::Loc
al<v8::Context>, v8::Local<v8::Object>) |
| 111 { |
| 112 ASSERT_NOT_REACHED(); |
| 113 return v8::MaybeLocal<v8::Value>(); |
| 114 } |
| 115 |
103 } // namespace blink | 116 } // namespace blink |
OLD | NEW |