Reset isolate exceptions in libfuzzer wasm tests.
BUG= https://code.google.com/p/v8/issues/detail?id=4203 TEST=wasm-fuzzer R=titzer@chromium.org,kcc@chromium.org LOG=N Review URL: https://codereview.chromium.org/1760033002 Cr-Commit-Position: refs/heads/master@{#34451}
This commit is contained in:
parent
76f37d3ba6
commit
f521e7e43e
@ -8,6 +8,7 @@
|
||||
|
||||
#include "include/v8.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/isolate-inl.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects-inl.h"
|
||||
#include "src/objects.h"
|
||||
@ -20,6 +21,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
v8::Isolate* isolate = support->GetIsolate();
|
||||
v8::internal::Isolate* i_isolate =
|
||||
reinterpret_cast<v8::internal::Isolate*>(isolate);
|
||||
|
||||
// Clear any pending exceptions from a prior run.
|
||||
if (i_isolate->has_pending_exception()) {
|
||||
i_isolate->clear_pending_exception();
|
||||
}
|
||||
|
||||
v8::Isolate::Scope isolate_scope(isolate);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Context::Scope context_scope(support->GetContext());
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "include/v8.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/isolate-inl.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects-inl.h"
|
||||
#include "src/objects.h"
|
||||
@ -20,6 +21,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
v8::Isolate* isolate = support->GetIsolate();
|
||||
v8::internal::Isolate* i_isolate =
|
||||
reinterpret_cast<v8::internal::Isolate*>(isolate);
|
||||
|
||||
// Clear any pending exceptions from a prior run.
|
||||
if (i_isolate->has_pending_exception()) {
|
||||
i_isolate->clear_pending_exception();
|
||||
}
|
||||
|
||||
v8::Isolate::Scope isolate_scope(isolate);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Context::Scope context_scope(support->GetContext());
|
||||
|
Loading…
Reference in New Issue
Block a user