WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 125059
93702
jsc has no facility for loading files as data
https://bugs.webkit.org/show_bug.cgi?id=93702
Summary
jsc has no facility for loading files as data
Michael Herring
Reported
2012-08-10 02:13:03 PDT
Using the jsc command-line tool, I have noticed there is no way to load a file other than to evaluate it as JavaScript. It is useful to be able to load a file as text or data, so I have created a patch to add a loadFile(path) function to jsc. The only change is to jsc.cpp, and simply adds the ability to load a file and turn its contents into a JSC string value.
Attachments
Patch
(2.49 KB, patch)
2012-08-10 02:23 PDT
,
Michael Herring
no flags
Details
Formatted Diff
Diff
Patch
(2.39 KB, patch)
2013-06-20 23:55 PDT
,
Michael Herring
no flags
Details
Formatted Diff
Diff
Patch
(2.39 KB, patch)
2013-06-21 00:03 PDT
,
Michael Herring
msaboff
: review-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Michael Herring
Comment 1
2012-08-10 02:23:57 PDT
Created
attachment 157688
[details]
Patch
Alexey Proskuryakov
Comment 2
2012-08-10 11:08:32 PDT
Would shell functionality help? cat myfile.js | jsc
Michael Herring
Comment 3
2012-08-10 11:10:53 PDT
It wouldn't be relevant, at least not the example you present, since I don't want to eval or load JavaScript in any way. (Rather, it already does that, and I need something else.) I want to load a file and turn the contents of it into a *string* variable. That's what this patch does.
Filip Pizlo
Comment 4
2012-08-13 15:46:05 PDT
Comment on
attachment 157688
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157688&action=review
> Source/JavaScriptCore/ChangeLog:8 > + Added a loadFile function to jsc for file input when testin libraries written in JS.
Typo: testin -> testing
Michael Herring
Comment 5
2013-06-20 23:55:47 PDT
Created
attachment 205152
[details]
Patch
Michael Herring
Comment 6
2013-06-20 23:57:07 PDT
Sorry for the insane delay on this. I've corrected the commit message, this should hopefully be ready to go in.
Build Bot
Comment 7
2013-06-20 23:58:37 PDT
Comment on
attachment 205152
[details]
Patch
Attachment 205152
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/918471
EFL EWS Bot
Comment 8
2013-06-20 23:58:54 PDT
Comment on
attachment 205152
[details]
Patch
Attachment 205152
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/857774
EFL EWS Bot
Comment 9
2013-06-21 00:00:20 PDT
Comment on
attachment 205152
[details]
Patch
Attachment 205152
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/884437
Early Warning System Bot
Comment 10
2013-06-21 00:01:09 PDT
Comment on
attachment 205152
[details]
Patch
Attachment 205152
[details]
did not pass qt-ews (qt): Output:
http://webkit-queues.appspot.com/results/876611
Early Warning System Bot
Comment 11
2013-06-21 00:01:29 PDT
Comment on
attachment 205152
[details]
Patch
Attachment 205152
[details]
did not pass qt-wk2-ews (qt-wk2): Output:
http://webkit-queues.appspot.com/results/876610
Michael Herring
Comment 12
2013-06-21 00:03:29 PDT
Created
attachment 205154
[details]
Patch
Michael Herring
Comment 13
2013-06-21 00:03:58 PDT
Fixed a typo from an old data type identifier.
Michael Saboff
Comment 14
2013-10-31 14:27:04 PDT
Comment on
attachment 205154
[details]
Patch Looks good. Please rebase this patch for the changes to throwing exceptions since the patch was originally posted and resubmit.
Daniel Bates
Comment 15
2015-12-23 09:58:00 PST
*** This bug has been marked as a duplicate of
bug 125059
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug