wvtest/javascript/v8shell.cc
v8::Handle<v8::Value> Read(const v8::Arguments& args) {
  if (args.Length() != 1) {
    return StringException("Usage: read(filename)");
  }
  v8::String::Utf8Value file(args[0]);
  if (*file == NULL) {
    return StringException("read(): Missing filename");
  }
  v8::Handle<v8::Value> source = ReadFile(*file);
  if (source.IsEmpty() || !source->IsString()) {
    return StringException("read(): Error loading file");
  }
  return source;
}
// The callback that is invoked by v8 whenever the JavaScript 'read'
// function is called.  This function loads the content of the file named in
// the argument into a JavaScript string.
The callback that is invoked by v8 whenever the JavaScript 'read'
function is called.  This function loads the content of the file named in
the argument into a JavaScript string.
The callback that is invoked by v8 whenever the JavaScript ' read ' function is called . This function loads the content of the file named in the argument into a JavaScript string .
v8::Handle<v8::Value> Read(const v8::Arguments& args) {
  if (args.Length() != 1) {
    return StringException("Usage: read(filename)");
  }
  v8::String::Utf8Value file(args[0]);
  if (*file == NULL) {
    return StringException("read(): Missing filename");
  }
  v8::Handle<v8::Value> source = ReadFile(*file);
  if (source.IsEmpty() || !source->IsString()) {
    return StringException("read(): Error loading file");
  }
  return source;
}
v8 :: Handle < v8 :: Value > Read ( const v8 :: Arguments & args ) { if ( args . Length ( ) != 1 ) { return StringException ( " " ) ; } v8 :: String :: Utf8Value file ( args [ 0 ] ) ; if ( * file == NULL ) { return StringException ( " " ) ; } v8 :: Handle < v8 :: Value > source = ReadFile ( * file ) ; if ( source . IsEmpty ( ) || ! source -> IsString ( ) ) { return StringException ( " " ) ; } return source ; }
The callback that is invoked by v8 whenever the JavaScript 'read'
function is called.
The callback that is invoked by v8 whenever the JavaScript ' read ' function is called .