| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index c23458fc4f84955c1220aba6045fc98872384d1c..3ca0dae67a5b79e16701a1a839bc5edf4e7fdc38 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -1196,6 +1196,13 @@ void Shell::Read(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| Throw(args.GetIsolate(), "Error loading file");
|
| return;
|
| }
|
| + if (args.Length() == 2) {
|
| + String::Utf8Value format(args[1]);
|
| + if (*format && std::strcmp(*format, "binary") == 0) {
|
| + ReadBuffer(args);
|
| + return;
|
| + }
|
| + }
|
| Local<String> source = ReadFile(args.GetIsolate(), *file);
|
| if (source.IsEmpty()) {
|
| Throw(args.GetIsolate(), "Error loading file");
|
|
|