| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 return; | 222 return; |
| 223 LocalDOMWindow* localDomWindow = toLocalDOMWindow(window); | 223 LocalDOMWindow* localDomWindow = toLocalDOMWindow(window); |
| 224 if (!localDomWindow) | 224 if (!localDomWindow) |
| 225 return; | 225 return; |
| 226 LocalFrame* frame = localDomWindow->frame(); | 226 LocalFrame* frame = localDomWindow->frame(); |
| 227 if (!frame) | 227 if (!frame) |
| 228 return; | 228 return; |
| 229 frame->console().addMessage(consoleMessage); | 229 frame->console().addMessage(consoleMessage); |
| 230 } | 230 } |
| 231 | 231 |
| 232 v8::MaybeLocal<v8::Value> MainThreadDebugger::memoryInfo(v8::Isolate* isolate, v
8::Local<v8::Context> context, v8::Local<v8::Object> creationContext) | 232 v8::MaybeLocal<v8::Value> MainThreadDebugger::memoryInfo(v8::Isolate* isolate, v
8::Local<v8::Context> context) |
| 233 { | 233 { |
| 234 ExecutionContext* executionContext = toExecutionContext(context); | 234 ExecutionContext* executionContext = toExecutionContext(context); |
| 235 ASSERT_UNUSED(executionContext, executionContext); | 235 ASSERT_UNUSED(executionContext, executionContext); |
| 236 ASSERT(executionContext->isDocument()); | 236 ASSERT(executionContext->isDocument()); |
| 237 return toV8(MemoryInfo::create(), creationContext, isolate); | 237 return toV8(MemoryInfo::create(), context->Global(), isolate); |
| 238 } | 238 } |
| 239 | 239 |
| 240 bool MainThreadDebugger::isCommandLineAPIMethod(const String& name) | 240 bool MainThreadDebugger::isCommandLineAPIMethod(const String& name) |
| 241 { | 241 { |
| 242 DEFINE_STATIC_LOCAL(HashSet<String>, methods, ()); | 242 DEFINE_STATIC_LOCAL(HashSet<String>, methods, ()); |
| 243 if (methods.size() == 0) { | 243 if (methods.size() == 0) { |
| 244 const char* members[] = { "$", "$$", "$x" }; | 244 const char* members[] = { "$", "$$", "$x" }; |
| 245 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) | 245 for (size_t i = 0; i < WTF_ARRAY_LENGTH(members); ++i) |
| 246 methods.add(members[i]); | 246 methods.add(members[i]); |
| 247 } | 247 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 return; | 345 return; |
| 346 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)) |
| 347 return; | 347 return; |
| 348 } | 348 } |
| 349 info.GetReturnValue().Set(nodes); | 349 info.GetReturnValue().Set(nodes); |
| 350 } | 350 } |
| 351 exceptionState.throwIfNeeded(); | 351 exceptionState.throwIfNeeded(); |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace blink | 354 } // namespace blink |
| OLD | NEW |