Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

chakrashim: fix console autocomplete in VS Code #356

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

kfarnung
Copy link
Contributor

@kfarnung kfarnung commented Aug 3, 2017

The autocomplete for VS Code (and probably Chrome) sends a blob of
JavaScript to the engine which enumerates/filters the properties and
returns them. The code wasn't respecting the returnByValue parameter
and VS Code was unable to get the length of the undefined value field
in the response.

While I was in there I also removed some unneeded fields from the
JavaScriptCallFrame class and fixed a build warning (C4800) in v8.h.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

chakrashim

@@ -57,18 +56,15 @@ class JavaScriptCallFrame {
v8::Local<v8::Object> details() const;

v8::MaybeLocal<v8::Value> evaluate(v8::Local<v8::Value> expression,
bool* isError);
bool returnByValue, bool* isError);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should each argument go on its own line, like the other functions around here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the node convention, the other method has them all on separate lines by coincidence in this case. There's not enough room on the line to support any two of those parameters.

@@ -2897,7 +2897,7 @@ bool PersistentBase<T>::IsNearDeath() const {

template <class T>
bool PersistentBase<T>::IsWeak() const {
return static_cast<bool>(_weakWrapper);
return _weakWrapper != nullptr;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the cause of the C4800 warning. Apparently VS2017 no longer issues a warning for it, but it seems weird to static cast when we're essentially just checking whether this is null?

@kfarnung kfarnung force-pushed the inspector branch 2 times, most recently from 0d82217 to 178eadf Compare August 3, 2017 02:43
@kfarnung
Copy link
Contributor Author

kfarnung commented Aug 3, 2017

@kfarnung
Copy link
Contributor Author

kfarnung commented Aug 3, 2017

CI looks clean.

@kfarnung
Copy link
Contributor Author

kfarnung commented Aug 3, 2017

One more CI for the rebase: https://ci.nodejs.org/job/chakracore-test-pull-request/135/

The autocomplete for VS Code (and probably Chrome) sends a blob of
JavaScript to the engine which enumerates/filters the properties and
returns them. The code wasn't respecting the `returnByValue` parameter
and VS Code was unable to get the length of the undefined `value` field
in the response.

While I was in there I also removed some unneeded fields from the
`JavaScriptCallFrame` class and fixed a build warning (C4800) in v8.h.

PR-URL: nodejs#356
Reviewed-By: Jimmy Thomson <jithomso@microsoft.com>
@kfarnung kfarnung merged commit fb72fa2 into nodejs:master Aug 4, 2017
@kfarnung kfarnung deleted the inspector branch August 4, 2017 00:50
kfarnung added a commit that referenced this pull request Aug 10, 2017
The autocomplete for VS Code (and probably Chrome) sends a blob of
JavaScript to the engine which enumerates/filters the properties and
returns them. The code wasn't respecting the `returnByValue` parameter
and VS Code was unable to get the length of the undefined `value` field
in the response.

While I was in there I also removed some unneeded fields from the
`JavaScriptCallFrame` class and fixed a build warning (C4800) in v8.h.

PR-URL: #356
Reviewed-By: Jimmy Thomson <jithomso@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants