-
Notifications
You must be signed in to change notification settings - Fork 340
chakrashim: fix console autocomplete in VS Code #356
Conversation
@@ -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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
0d82217
to
178eadf
Compare
CI looks clean. |
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>
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>
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
parameterand VS Code was unable to get the length of the undefined
value
fieldin 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), orvcbuild test
(Windows) passesAffected core subsystem(s)
chakrashim