From 5e72b77167d5074b9e104de041e0e204232f5c41 Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Tue, 28 Oct 2008 17:35:27 +0000 Subject: Change the fatal error handler to no longer return to V8. It will now crash the renderer. Returning as it did before would end up in V8 OS::Abort calling __debugbreak() which would also crask the renderer. I am about to change V8 OS::Abort to call abort() instead of __debugbreak() and Chrome should not depend on how V8 handles aborts anyway. Review URL: http://codereview.chromium.org/8838 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4070 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/port/bindings/v8/v8_proxy.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 920f494..f21197b 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -788,14 +788,6 @@ static void ReportUnsafeJavaScriptAccess(v8::Local host, ReportUnsafeAccessTo(target, REPORT_LATER); } -static void ReportFatalErrorInV8(const char* location, const char* message) -{ - // V8 is shutdown, we cannot use V8 api. - // The only thing we can do is to disable JavaScript. - // TODO: clean up V8Proxy and disable JavaScript. - printf("V8 error: %s (%s)\n", message, location); -} - static void HandleFatalErrorInV8() { // TODO: We temporarily deal with V8 internal error situations @@ -803,6 +795,14 @@ static void HandleFatalErrorInV8() CRASH(); } +static void ReportFatalErrorInV8(const char* location, const char* message) +{ + // V8 is shutdown, we cannot use V8 api. + // The only thing we can do is to disable JavaScript. + // TODO: clean up V8Proxy and disable JavaScript. + printf("V8 error: %s (%s)\n", message, location); + HandleFatalErrorInV8(); +} V8Proxy::~V8Proxy() { -- cgit v1.1