| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/v8_inspector/V8DebuggerScript.h" | 5 #include "platform/v8_inspector/V8DebuggerScript.h" |
| 6 | 6 |
| 7 #include "platform/inspector_protocol/Collections.h" | 7 #include "platform/inspector_protocol/Collections.h" |
| 8 #include "platform/inspector_protocol/Platform.h" | 8 #include "platform/inspector_protocol/Platform.h" |
| 9 #include "platform/v8_inspector/V8StringUtil.h" | 9 #include "platform/v8_inspector/V8StringUtil.h" |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 m_id = String16::fromInteger(idValue->Int32Value()); | 73 m_id = String16::fromInteger(idValue->Int32Value()); |
| 74 | 74 |
| 75 m_url = toProtocolStringWithTypeCheck(object->Get(toV8StringInternalized(iso
late, "name"))); | 75 m_url = toProtocolStringWithTypeCheck(object->Get(toV8StringInternalized(iso
late, "name"))); |
| 76 m_sourceURL = toProtocolStringWithTypeCheck(object->Get(toV8StringInternaliz
ed(isolate, "sourceURL"))); | 76 m_sourceURL = toProtocolStringWithTypeCheck(object->Get(toV8StringInternaliz
ed(isolate, "sourceURL"))); |
| 77 m_sourceMappingURL = toProtocolStringWithTypeCheck(object->Get(toV8StringInt
ernalized(isolate, "sourceMappingURL"))); | 77 m_sourceMappingURL = toProtocolStringWithTypeCheck(object->Get(toV8StringInt
ernalized(isolate, "sourceMappingURL"))); |
| 78 m_startLine = object->Get(toV8StringInternalized(isolate, "startLine"))->ToI
nteger(isolate)->Value(); | 78 m_startLine = object->Get(toV8StringInternalized(isolate, "startLine"))->ToI
nteger(isolate)->Value(); |
| 79 m_startColumn = object->Get(toV8StringInternalized(isolate, "startColumn"))-
>ToInteger(isolate)->Value(); | 79 m_startColumn = object->Get(toV8StringInternalized(isolate, "startColumn"))-
>ToInteger(isolate)->Value(); |
| 80 m_endLine = object->Get(toV8StringInternalized(isolate, "endLine"))->ToInteg
er(isolate)->Value(); | 80 m_endLine = object->Get(toV8StringInternalized(isolate, "endLine"))->ToInteg
er(isolate)->Value(); |
| 81 m_endColumn = object->Get(toV8StringInternalized(isolate, "endColumn"))->ToI
nteger(isolate)->Value(); | 81 m_endColumn = object->Get(toV8StringInternalized(isolate, "endColumn"))->ToI
nteger(isolate)->Value(); |
| 82 m_executionContextAuxData = toProtocolStringWithTypeCheck(object->Get(toV8St
ringInternalized(isolate, "executionContextAuxData"))); | 82 m_executionContextAuxData = toProtocolStringWithTypeCheck(object->Get(toV8St
ringInternalized(isolate, "executionContextAuxData"))); |
| 83 m_isInternalScript = object->Get(toV8StringInternalized(isolate, "isInternal
Script"))->ToBoolean(isolate)->Value(); | |
| 84 m_executionContextId = object->Get(toV8StringInternalized(isolate, "executio
nContextId"))->ToInteger(isolate)->Value(); | 83 m_executionContextId = object->Get(toV8StringInternalized(isolate, "executio
nContextId"))->ToInteger(isolate)->Value(); |
| 85 m_isLiveEdit = isLiveEdit; | 84 m_isLiveEdit = isLiveEdit; |
| 86 | 85 |
| 87 v8::Local<v8::Value> sourceValue = object->Get(toV8StringInternalized(isolat
e, "source")); | 86 v8::Local<v8::Value> sourceValue = object->Get(toV8StringInternalized(isolat
e, "source")); |
| 88 if (!sourceValue.IsEmpty() && sourceValue->IsString()) | 87 if (!sourceValue.IsEmpty() && sourceValue->IsString()) |
| 89 setSource(isolate, sourceValue.As<v8::String>()); | 88 setSource(isolate, sourceValue.As<v8::String>()); |
| 90 } | 89 } |
| 91 | 90 |
| 92 V8DebuggerScript::~V8DebuggerScript() | 91 V8DebuggerScript::~V8DebuggerScript() |
| 93 { | 92 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 113 m_sourceMappingURL = sourceMappingURL; | 112 m_sourceMappingURL = sourceMappingURL; |
| 114 } | 113 } |
| 115 | 114 |
| 116 void V8DebuggerScript::setSource(v8::Isolate* isolate, v8::Local<v8::String> sou
rce) | 115 void V8DebuggerScript::setSource(v8::Isolate* isolate, v8::Local<v8::String> sou
rce) |
| 117 { | 116 { |
| 118 m_source.Reset(isolate, source); | 117 m_source.Reset(isolate, source); |
| 119 m_hash = calculateHash(toProtocolString(source)); | 118 m_hash = calculateHash(toProtocolString(source)); |
| 120 } | 119 } |
| 121 | 120 |
| 122 } // namespace blink | 121 } // namespace blink |
| OLD | NEW |