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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 stackTrace ? stackTrace->clone() : nullptr, 0); | 319 stackTrace ? stackTrace->clone() : nullptr, 0); |
320 frame->console().reportMessageToClient(ConsoleAPIMessageSource, | 320 frame->console().reportMessageToClient(ConsoleAPIMessageSource, |
321 v8MessageLevelToMessageLevel(level), | 321 v8MessageLevelToMessageLevel(level), |
322 toCoreString(message), location.get()); | 322 toCoreString(message), location.get()); |
323 } | 323 } |
324 | 324 |
325 void MainThreadDebugger::consoleClear(int contextGroupId) { | 325 void MainThreadDebugger::consoleClear(int contextGroupId) { |
326 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); | 326 LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId); |
327 if (!frame) | 327 if (!frame) |
328 return; | 328 return; |
329 if (frame->host()) | 329 if (frame->page()) |
330 frame->host()->consoleMessageStorage().clear(); | 330 frame->page()->consoleMessageStorage().clear(); |
331 } | 331 } |
332 | 332 |
333 v8::MaybeLocal<v8::Value> MainThreadDebugger::memoryInfo( | 333 v8::MaybeLocal<v8::Value> MainThreadDebugger::memoryInfo( |
334 v8::Isolate* isolate, | 334 v8::Isolate* isolate, |
335 v8::Local<v8::Context> context) { | 335 v8::Local<v8::Context> context) { |
336 ExecutionContext* executionContext = toExecutionContext(context); | 336 ExecutionContext* executionContext = toExecutionContext(context); |
337 DCHECK(executionContext); | 337 DCHECK(executionContext); |
338 ASSERT(executionContext->isDocument()); | 338 ASSERT(executionContext->isDocument()); |
339 return ToV8(MemoryInfo::create(), context->Global(), isolate); | 339 return ToV8(MemoryInfo::create(), context->Global(), isolate); |
340 } | 340 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 context, nodes, index++, | 462 context, nodes, index++, |
463 ToV8(node, info.Holder(), info.GetIsolate())) | 463 ToV8(node, info.Holder(), info.GetIsolate())) |
464 .FromMaybe(false)) | 464 .FromMaybe(false)) |
465 return; | 465 return; |
466 } | 466 } |
467 info.GetReturnValue().Set(nodes); | 467 info.GetReturnValue().Set(nodes); |
468 } | 468 } |
469 } | 469 } |
470 | 470 |
471 } // namespace blink | 471 } // namespace blink |
OLD | NEW |