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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 273 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
274 frame->settings()->setForceMainWorldInitialization(false); | 274 frame->settings()->setForceMainWorldInitialization(false); |
275 } | 275 } |
276 | 276 |
277 bool MainThreadDebugger::canExecuteScripts(int contextGroupId) | 277 bool MainThreadDebugger::canExecuteScripts(int contextGroupId) |
278 { | 278 { |
279 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 279 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
280 return frame->script().canExecuteScripts(NotAboutToExecuteScript); | 280 return frame->script().canExecuteScripts(NotAboutToExecuteScript); |
281 } | 281 } |
282 | 282 |
283 void MainThreadDebugger::resumeStartup(int contextGroupId) | 283 void MainThreadDebugger::runIfWaitingForDebugger(int contextGroupId) |
284 { | 284 { |
285 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 285 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
286 if (m_clientMessageLoop) | 286 if (m_clientMessageLoop) |
287 m_clientMessageLoop->resumeStartup(frame); | 287 m_clientMessageLoop->runIfWaitingForDebugger(frame); |
288 } | 288 } |
289 | 289 |
290 void MainThreadDebugger::consoleAPIMessage(int contextGroupId, v8_inspector::V8C
onsoleAPIType type, const String16& message, const String16& url, unsigned lineN
umber, unsigned columnNumber, v8_inspector::V8StackTrace* stackTrace) | 290 void MainThreadDebugger::consoleAPIMessage(int contextGroupId, v8_inspector::V8C
onsoleAPIType type, const String16& message, const String16& url, unsigned lineN
umber, unsigned columnNumber, v8_inspector::V8StackTrace* stackTrace) |
291 { | 291 { |
292 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 292 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
293 if (!frame) | 293 if (!frame) |
294 return; | 294 return; |
295 if (type == v8_inspector::V8ConsoleAPIType::kClear && frame->host()) | 295 if (type == v8_inspector::V8ConsoleAPIType::kClear && frame->host()) |
296 frame->host()->consoleMessageStorage().clear(); | 296 frame->host()->consoleMessageStorage().clear(); |
297 std::unique_ptr<SourceLocation> location = SourceLocation::create(url, lineN
umber, columnNumber, stackTrace ? stackTrace->clone() : nullptr, 0); | 297 std::unique_ptr<SourceLocation> location = SourceLocation::create(url, lineN
umber, columnNumber, stackTrace ? stackTrace->clone() : nullptr, 0); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 return; | 403 return; |
404 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) | 404 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) |
405 return; | 405 return; |
406 } | 406 } |
407 info.GetReturnValue().Set(nodes); | 407 info.GetReturnValue().Set(nodes); |
408 } | 408 } |
409 exceptionState.throwIfNeeded(); | 409 exceptionState.throwIfNeeded(); |
410 } | 410 } |
411 | 411 |
412 } // namespace blink | 412 } // namespace blink |
OLD | NEW |