| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 DOMWrapperWorld& world = scriptState->world(); | 116 DOMWrapperWorld& world = scriptState->world(); |
| 117 debugger()->contextCreated(V8ContextInfo(scriptState->context(), contextGrou
pId(frame), world.isMainWorld(), origin ? origin->toRawString() : "", world.isIs
olatedWorld() ? world.isolatedWorldHumanReadableName() : "", IdentifiersFactory:
:frameId(frame), scriptState->getExecutionContext()->isDocument())); | 117 debugger()->contextCreated(V8ContextInfo(scriptState->context(), contextGrou
pId(frame), world.isMainWorld(), origin ? origin->toRawString() : "", world.isIs
olatedWorld() ? world.isolatedWorldHumanReadableName() : "", IdentifiersFactory:
:frameId(frame), scriptState->getExecutionContext()->isDocument())); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void MainThreadDebugger::contextWillBeDestroyed(ScriptState* scriptState) | 120 void MainThreadDebugger::contextWillBeDestroyed(ScriptState* scriptState) |
| 121 { | 121 { |
| 122 v8::HandleScope handles(scriptState->isolate()); | 122 v8::HandleScope handles(scriptState->isolate()); |
| 123 debugger()->contextDestroyed(scriptState->context()); | 123 debugger()->contextDestroyed(scriptState->context()); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void MainThreadDebugger::exceptionUnhandled(LocalFrame* frame, const String& err
orMessage, std::unique_ptr<SourceLocation> location) |
| 127 { |
| 128 debugger()->exceptionUnhandled(contextGroupId(frame), errorMessage, location
->url(), location->lineNumber(), location->columnNumber(), location->cloneStackT
race(), location->scriptId()); |
| 129 } |
| 130 |
| 126 int MainThreadDebugger::contextGroupId(LocalFrame* frame) | 131 int MainThreadDebugger::contextGroupId(LocalFrame* frame) |
| 127 { | 132 { |
| 128 LocalFrame* localFrameRoot = frame->localFrameRoot(); | 133 LocalFrame* localFrameRoot = frame->localFrameRoot(); |
| 129 return frameId(localFrameRoot); | 134 return frameId(localFrameRoot); |
| 130 } | 135 } |
| 131 | 136 |
| 132 MainThreadDebugger* MainThreadDebugger::instance() | 137 MainThreadDebugger* MainThreadDebugger::instance() |
| 133 { | 138 { |
| 134 ASSERT(isMainThread()); | 139 ASSERT(isMainThread()); |
| 135 V8PerIsolateData* data = V8PerIsolateData::from(V8PerIsolateData::mainThread
Isolate()); | 140 V8PerIsolateData* data = V8PerIsolateData::from(V8PerIsolateData::mainThread
Isolate()); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 return; | 308 return; |
| 304 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) | 309 if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.Get
Isolate())).FromMaybe(false)) |
| 305 return; | 310 return; |
| 306 } | 311 } |
| 307 info.GetReturnValue().Set(nodes); | 312 info.GetReturnValue().Set(nodes); |
| 308 } | 313 } |
| 309 exceptionState.throwIfNeeded(); | 314 exceptionState.throwIfNeeded(); |
| 310 } | 315 } |
| 311 | 316 |
| 312 } // namespace blink | 317 } // namespace blink |
| OLD | NEW |