Commit ec9b7805 authored by Mostyn Bramley-Moore's avatar Mostyn Bramley-Moore Committed by Commit Bot

[jumbo] rename one of the TryCatchScope's

https://chromium-review.googlesource.com/c/chromium/src/+/985345 added
a second TryCatchScope test helper with different assumptions to the
existing one in bindings/core/v8/ScriptPromiseTest.cpp - which then
broke jumbo builds due to ambiguous namespace lookup results.

Let's rename the TryCatchScope in ScriptPromiseTest.cpp to avoid this
problem.

TBR=yhirano@chromium.org

Bug: 769663
Change-Id: If9911951669f806a17919c78e1990f3f04209df9
Reviewed-on: https://chromium-review.googlesource.com/989754
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547483}
parent c45788b3
......@@ -70,12 +70,12 @@ class FunctionForScriptPromiseTest : public ScriptFunction {
ScriptValue* output_;
};
class TryCatchScope {
class ScriptPromiseTestTryCatchScope {
public:
explicit TryCatchScope(v8::Isolate* isolate)
explicit ScriptPromiseTestTryCatchScope(v8::Isolate* isolate)
: isolate_(isolate), trycatch_(isolate) {}
~TryCatchScope() {
~ScriptPromiseTestTryCatchScope() {
// Execute all pending microtasks
v8::MicrotasksScope::PerformCheckpoint(isolate_);
}
......@@ -99,7 +99,7 @@ Vector<String> ToStringArray(v8::Isolate* isolate, const ScriptValue& value) {
TEST(ScriptPromiseTest, constructFromNonPromise) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromise promise(scope.GetScriptState(),
v8::Undefined(scope.GetIsolate()));
ASSERT_TRUE(try_catch_scope.HasCaught());
......@@ -108,7 +108,7 @@ TEST(ScriptPromiseTest, constructFromNonPromise) {
TEST(ScriptPromiseTest, thenResolve) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
Resolver resolver(scope.GetScriptState());
ScriptPromise promise = resolver.Promise();
ScriptValue on_fulfilled, on_rejected;
......@@ -135,7 +135,7 @@ TEST(ScriptPromiseTest, thenResolve) {
TEST(ScriptPromiseTest, resolveThen) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
Resolver resolver(scope.GetScriptState());
ScriptPromise promise = resolver.Promise();
ScriptValue on_fulfilled, on_rejected;
......@@ -157,7 +157,7 @@ TEST(ScriptPromiseTest, resolveThen) {
TEST(ScriptPromiseTest, thenReject) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
Resolver resolver(scope.GetScriptState());
ScriptPromise promise = resolver.Promise();
ScriptValue on_fulfilled, on_rejected;
......@@ -184,7 +184,7 @@ TEST(ScriptPromiseTest, thenReject) {
TEST(ScriptPromiseTest, rejectThen) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
Resolver resolver(scope.GetScriptState());
ScriptPromise promise = resolver.Promise();
ScriptValue on_fulfilled, on_rejected;
......@@ -206,7 +206,7 @@ TEST(ScriptPromiseTest, rejectThen) {
TEST(ScriptPromiseTest, castPromise) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromise promise = Resolver(scope.GetScriptState()).Promise();
ScriptPromise new_promise =
ScriptPromise::Cast(scope.GetScriptState(), promise.V8Value());
......@@ -217,7 +217,7 @@ TEST(ScriptPromiseTest, castPromise) {
TEST(ScriptPromiseTest, castNonPromise) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptValue on_fulfilled1, on_fulfilled2, on_rejected1, on_rejected2;
ScriptValue value = ScriptValue(scope.GetScriptState(),
......@@ -257,7 +257,7 @@ TEST(ScriptPromiseTest, castNonPromise) {
TEST(ScriptPromiseTest, reject) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptValue on_fulfilled, on_rejected;
ScriptValue value = ScriptValue(scope.GetScriptState(),
......@@ -283,7 +283,7 @@ TEST(ScriptPromiseTest, reject) {
TEST(ScriptPromiseTest, rejectWithExceptionState) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptValue on_fulfilled, on_rejected;
ScriptPromise promise = ScriptPromise::RejectWithDOMException(
scope.GetScriptState(),
......@@ -306,7 +306,7 @@ TEST(ScriptPromiseTest, rejectWithExceptionState) {
TEST(ScriptPromiseTest, allWithEmptyPromises) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptValue on_fulfilled, on_rejected;
ScriptPromise promise =
......@@ -330,7 +330,7 @@ TEST(ScriptPromiseTest, allWithEmptyPromises) {
TEST(ScriptPromiseTest, allWithResolvedPromises) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptValue on_fulfilled, on_rejected;
Vector<ScriptPromise> promises;
......@@ -361,7 +361,7 @@ TEST(ScriptPromiseTest, allWithResolvedPromises) {
TEST(ScriptPromiseTest, allWithRejectedPromise) {
V8TestingScope scope;
TryCatchScope try_catch_scope(scope.GetIsolate());
ScriptPromiseTestTryCatchScope try_catch_scope(scope.GetIsolate());
ScriptValue on_fulfilled, on_rejected;
Vector<ScriptPromise> promises;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment