Commit 2152297c authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

Revert "[debug] Add test for promise finally"

This reverts commit a2ed0514.

Reason for revert: Breaks ARM debug -
https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/4377

Original change's description:
> [debug] Add test for promise finally
> 
> As of v8:6536, we no longer have to mark builtins explicitly.
> 
> Also remove test whitelist for promise finally
> builtins.
> 
> Bug: v8:6088, v8:5967
> Change-Id: I7f98dfe7708678653e944ac76ba9938205490b16
> Reviewed-on: https://chromium-review.googlesource.com/654067
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47896}

TBR=gsathya@chromium.org,jgruber@chromium.org

Change-Id: I2c064671a7650c3c97840e20dfdad4d6343ed0a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6088, v8:5967
Reviewed-on: https://chromium-review.googlesource.com/655737Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47899}
parent af4ff8c7
...@@ -6523,12 +6523,17 @@ TEST(BuiltinsExceptionPrediction) { ...@@ -6523,12 +6523,17 @@ TEST(BuiltinsExceptionPrediction) {
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Context::New(isolate); v8::Context::New(isolate);
// TODO(gsathya): Fix catch prediction for the following.
std::set<int> whitelist(
{i::Builtins::kPromiseThenFinally, i::Builtins::kPromiseCatchFinally});
i::Builtins* builtins = CcTest::i_isolate()->builtins(); i::Builtins* builtins = CcTest::i_isolate()->builtins();
bool fail = false; bool fail = false;
for (int i = 0; i < i::Builtins::builtin_count; i++) { for (int i = 0; i < i::Builtins::builtin_count; i++) {
Code* builtin = builtins->builtin(i); Code* builtin = builtins->builtin(i);
if (builtin->kind() != Code::BUILTIN) continue; if (builtin->kind() != Code::BUILTIN) continue;
if (whitelist.find(i) != whitelist.end()) continue;
auto prediction = builtin->GetBuiltinCatchPrediction(); auto prediction = builtin->GetBuiltinCatchPrediction();
USE(prediction); USE(prediction);
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-promise-finally
Debug = debug.Debug
var exception = null;
var step = 0;
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Exception) return;
try {
var line = exec_state.frame(0).sourceLineText();
var match = /Exception/.exec(line);
assertNotNull(match);
step++;
} catch (e) {
exception = e;
}
}
// Caught throw, events on any exception.
Debug.setListener(listener);
Debug.setBreakOnException();
var thenable = {
get then() {
throw new Error('err'); // Exception
}
};
var caughtException = null;
Promise.resolve()
.finally(() => thenable)
.catch(e => caughtException = e);
%RunMicrotasks();
Debug.setListener(null);
Debug.clearBreakOnException();
assertNull(exception);
assertNotNull(caughtException);
assertEquals(1, step);
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