| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2010-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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 v8::MaybeLocal<v8::Value> V8DebuggerImpl::functionScopes(v8::Local<v8::Function>
function) | 657 v8::MaybeLocal<v8::Value> V8DebuggerImpl::functionScopes(v8::Local<v8::Function>
function) |
| 658 { | 658 { |
| 659 if (!enabled()) { | 659 if (!enabled()) { |
| 660 NOTREACHED(); | 660 NOTREACHED(); |
| 661 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); | 661 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); |
| 662 } | 662 } |
| 663 v8::Local<v8::Value> argv[] = { function }; | 663 v8::Local<v8::Value> argv[] = { function }; |
| 664 return callDebuggerMethod("getFunctionScopes", 1, argv); | 664 return callDebuggerMethod("getFunctionScopes", 1, argv); |
| 665 } | 665 } |
| 666 | 666 |
| 667 v8::MaybeLocal<v8::Array> V8DebuggerImpl::internalProperties(v8::Local<v8::Value
> value) |
| 668 { |
| 669 v8::Local<v8::Array> properties; |
| 670 if (!v8::Debug::GetInternalProperties(m_isolate, value).ToLocal(&properties)
) |
| 671 return v8::MaybeLocal<v8::Array>(); |
| 672 if (!enabled()) |
| 673 return properties; |
| 674 if (value->IsMap() || value->IsWeakMap() || value->IsSet() || value->IsWeakS
et() || value->IsSetIterator() || value->IsMapIterator()) { |
| 675 v8::Local<v8::Value> entries = collectionEntries(v8::Local<v8::Object>::
Cast(value)); |
| 676 if (entries->IsArray()) { |
| 677 properties->Set(properties->Length(), v8InternalizedString("[[Entrie
s]]")); |
| 678 properties->Set(properties->Length(), entries); |
| 679 } |
| 680 } |
| 681 return properties; |
| 682 } |
| 683 |
| 667 v8::Local<v8::Value> V8DebuggerImpl::generatorObjectDetails(v8::Local<v8::Object
>& object) | 684 v8::Local<v8::Value> V8DebuggerImpl::generatorObjectDetails(v8::Local<v8::Object
>& object) |
| 668 { | 685 { |
| 669 if (!enabled()) { | 686 if (!enabled()) { |
| 670 NOTREACHED(); | 687 NOTREACHED(); |
| 671 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); | 688 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); |
| 672 } | 689 } |
| 673 v8::Local<v8::Value> argv[] = { object }; | 690 v8::Local<v8::Value> argv[] = { object }; |
| 674 return callDebuggerMethod("getGeneratorObjectDetails", 1, argv).ToLocalCheck
ed(); | 691 return callDebuggerMethod("getGeneratorObjectDetails", 1, argv).ToLocalCheck
ed(); |
| 675 } | 692 } |
| 676 | 693 |
| 677 v8::Local<v8::Value> V8DebuggerImpl::collectionEntries(v8::Local<v8::Object>& ob
ject) | 694 v8::Local<v8::Value> V8DebuggerImpl::collectionEntries(v8::Local<v8::Object> obj
ect) |
| 678 { | 695 { |
| 679 if (!enabled()) { | 696 if (!enabled()) { |
| 680 NOTREACHED(); | 697 NOTREACHED(); |
| 681 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); | 698 return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate)); |
| 682 } | 699 } |
| 683 v8::Local<v8::Value> argv[] = { object }; | 700 v8::Local<v8::Value> argv[] = { object }; |
| 684 return callDebuggerMethod("getCollectionEntries", 1, argv).ToLocalChecked(); | 701 return callDebuggerMethod("getCollectionEntries", 1, argv).ToLocalChecked(); |
| 685 } | 702 } |
| 686 | 703 |
| 687 bool V8DebuggerImpl::isPaused() | 704 bool V8DebuggerImpl::isPaused() |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 return nullptr; | 974 return nullptr; |
| 958 return m_contexts.get(contextGroupId); | 975 return m_contexts.get(contextGroupId); |
| 959 } | 976 } |
| 960 | 977 |
| 961 V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI
d) | 978 V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI
d) |
| 962 { | 979 { |
| 963 return contextGroupId ? m_sessions.get(contextGroupId) : nullptr; | 980 return contextGroupId ? m_sessions.get(contextGroupId) : nullptr; |
| 964 } | 981 } |
| 965 | 982 |
| 966 } // namespace blink | 983 } // namespace blink |
| OLD | NEW |