-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps: cherry-pick dbfcc48 from upstream V8 #22251
Conversation
By accident I broke my previous PR: #22224 |
@nodejs/v8 |
This LGTM by itself, but I'd prefer landing this with the actual Node.js |
@TimothyGu please take another look. |
@TimothyGu I addressed your comments and added one more test. Please take another look. |
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.
Newly added code LGTM. Some logistical comments.
src/node_url.cc
Outdated
@@ -2348,6 +2348,21 @@ std::string URL::ToFilePath() const { | |||
#endif | |||
} | |||
|
|||
URL URL::FromFilePath(const std::string& file_path) { | |||
URL url; | |||
url.context_.scheme = "file:"; |
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.
I'm a bit reluctant to touch into the internals in this way. Could something like this work?
URL url("file:///");
This will also need a cctest (see https://github.com/nodejs/node/blob/master/test/cctest/test_url.cc).
Finally could you split the changes to node_url into a separate commit?
Addressed comments and started another CI: https://ci.nodejs.org/job/node-test-pull-request/16880/ |
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.
Looks good to me.
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.
Hmm, jumped the gun there. Left a few more comments.
Failure on Windows bot looks unrelated. @TimothyGu could you take another look? |
This needs a rebase. |
@nodejs/v8-update PTAL. This needs some LGs |
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.
LGTM if tests pass.
Rebased and started CI: https://ci.nodejs.org/job/node-test-pull-request/17120/ |
rebased and restarted CI again since I believe that failure is unrelated: https://ci.nodejs.org/job/node-test-pull-request/17126/ |
Windows bot looks disabled on CI, based on previous CI all related tests passed, I am not sure, should I wait until windows is fixed on CI or can I land it as is? |
Wired up support for calling the node-provided `resourceNameToUrl` method in the chakrashim inspector. This reverts commit 3f6ef13. PR-URL: nodejs#601 Fixes: nodejs#598 Refs: nodejs/node#22251 Reviewed-By: Jimmy Thomson <[email protected]> Reviewed-By: Seth Brenith <[email protected]>
Wired up support for calling the node-provided `resourceNameToUrl` method in the chakrashim inspector. This reverts commit 3f6ef13. PR-URL: nodejs#601 Fixes: nodejs#598 Refs: nodejs/node#22251 Reviewed-By: Jimmy Thomson <[email protected]> Reviewed-By: Seth Brenith <[email protected]>
Original commit message: ``` [inspector] added V8InspectorClient::resourceNameToUrl Some clients (see Node.js) use platform path as ScriptOrigin. Reporting platform path in protocol makes using protocol much harder. This CL introduced V8InspectorClient::resourceNameToUrl method that is called for any reported using protocol url. V8Inspector uses url internally as well so protocol client may generate pattern for blackboxing with file urls only and does not need to build complicated regexp that covers files urls and platform paths on different platforms. [email protected] [email protected] Bug: none Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iff302e7441df922fa5d689fe510f5a9bfd470b9b Reviewed-on: https://chromium-review.googlesource.com/1164624 Commit-Queue: Aleksey Kozyatinskiy <[email protected]> Reviewed-by: Alexei Filippov <[email protected]> Cr-Commit-Position: refs/heads/master@{#55029} ``` Refs: v8/v8@dbfcc48 Backport-PR-URL: #22918 PR-URL: #22251 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Method returns file URL from native file path. Backport-PR-URL: #22918 PR-URL: #22251 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
This method is required by inspector to report normalized urls over the protocol. Backport-PR-URL: #22918 Fixes #22223 PR-URL: #22251 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Original commit message:
Refs: v8/v8@dbfcc48
Needed for #22223
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes