[wasm] Add UTF-8 validation

Names passed for imports and exports are checked during decoding,
leading to errors if they are no valid UTF-8. Function names are not
checked during decode, but rather lead to undefined being returned at
runtime if they are not UTF-8.

We need to do these checks on the Wasm side, since the factory
methods assume to get valid UTF-8 strings.

R=titzer@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/1967023004
Cr-Commit-Position: refs/heads/master@{#36208}
8 files changed
tree: f779f12c8038a96dd37fbc891f363f7394ad4fef
  1. benchmarks/
  2. build_overrides/
  3. docs/
  4. gypfiles/
  5. include/
  6. infra/
  7. samples/
  8. src/
  9. test/
  10. testing/
  11. third_party/
  12. tools/
  13. .clang-format
  14. .gitignore
  15. .gn
  16. .ycm_extra_conf.py
  17. AUTHORS
  18. BUILD.gn
  19. ChangeLog
  20. CODE_OF_CONDUCT.md
  21. codereview.settings
  22. DEPS
  23. LICENSE
  24. LICENSE.strongtalk
  25. LICENSE.v8
  26. LICENSE.valgrind
  27. Makefile
  28. Makefile.android
  29. Makefile.nacl
  30. OWNERS
  31. PRESUBMIT.py
  32. README.md
  33. snapshot_toolchain.gni
  34. WATCHLISTS
README.md

V8 JavaScript Engine

V8 is Google's open source JavaScript engine.

V8 implements ECMAScript as specified in ECMA-262.

V8 is written in C++ and is used in Google Chrome, the open source browser from Google.

V8 can run standalone, or can be embedded into any C++ application.

V8 Project page: https://github.com/v8/v8/wiki

Getting the Code

Checkout depot tools, and run

    fetch v8

This will checkout V8 into the directory v8 and fetch all of its dependencies. To stay up to date, run

    git pull origin
    gclient sync

For fetching all branches, add the following into your remote configuration in .git/config:

    fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
    fetch = +refs/tags/*:refs/tags/*

Contributing

Please follow the instructions mentioned on the V8 wiki.