| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 261 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
| 262 frame->settings()->setForceMainWorldInitialization(false); | 262 frame->settings()->setForceMainWorldInitialization(false); |
| 263 } | 263 } |
| 264 | 264 |
| 265 bool MainThreadDebugger::canExecuteScripts(int contextGroupId) | 265 bool MainThreadDebugger::canExecuteScripts(int contextGroupId) |
| 266 { | 266 { |
| 267 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 267 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
| 268 return frame->script().canExecuteScripts(NotAboutToExecuteScript); | 268 return frame->script().canExecuteScripts(NotAboutToExecuteScript); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void MainThreadDebugger::resumeStartup(int contextGroupId) |
| 272 { |
| 273 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
| 274 if (m_clientMessageLoop) |
| 275 m_clientMessageLoop->resumeStartup(frame); |
| 276 } |
| 277 |
| 271 void MainThreadDebugger::consoleAPIMessage(int contextGroupId, V8ConsoleAPIType
type, const String16& message, const String16& url, unsigned lineNumber, unsigne
d columnNumber, V8StackTrace* stackTrace) | 278 void MainThreadDebugger::consoleAPIMessage(int contextGroupId, V8ConsoleAPIType
type, const String16& message, const String16& url, unsigned lineNumber, unsigne
d columnNumber, V8StackTrace* stackTrace) |
| 272 { | 279 { |
| 273 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 280 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
| 274 if (!frame) | 281 if (!frame) |
| 275 return; | 282 return; |
| 276 if (type == V8ConsoleAPIType::kClear && frame->host()) | 283 if (type == V8ConsoleAPIType::kClear && frame->host()) |
| 277 frame->host()->consoleMessageStorage().clear(); | 284 frame->host()->consoleMessageStorage().clear(); |
| 278 // TODO(dgozman): do not wrap in ConsoleMessage. | 285 // TODO(dgozman): do not wrap in ConsoleMessage. |
| 279 ConsoleMessage* consoleMessage = ConsoleMessage::create(ConsoleAPIMessageSou
rce, consoleAPITypeToMessageLevel(type), message, SourceLocation::create(url, li
neNumber, columnNumber, stackTrace ? stackTrace->clone() : nullptr, 0)); | 286 ConsoleMessage* consoleMessage = ConsoleMessage::create(ConsoleAPIMessageSou
rce, consoleAPITypeToMessageLevel(type), message, SourceLocation::create(url, li
neNumber, columnNumber, stackTrace ? stackTrace->clone() : nullptr, 0)); |
| 280 frame->console().reportMessageToClient(consoleMessage); | 287 frame->console().reportMessageToClient(consoleMessage); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 return; | 392 return; |
| 386 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) | 393 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) |
| 387 return; | 394 return; |
| 388 } | 395 } |
| 389 info.GetReturnValue().Set(nodes); | 396 info.GetReturnValue().Set(nodes); |
| 390 } | 397 } |
| 391 exceptionState.throwIfNeeded(); | 398 exceptionState.throwIfNeeded(); |
| 392 } | 399 } |
| 393 | 400 |
| 394 } // namespace blink | 401 } // namespace blink |
| OLD | NEW |