⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 99386 in webkit


Ignore:
Timestamp:
Nov 6, 2011, 2:52:22 PM (15 years ago)
Author:
abarth@webkit.org
Message:

Don't crash when a context hasn't been created. This fixed a
testing-only crash on the bots in the Chromium port.

  • testing/v8/WebCoreTestSupport.cpp:

(WebCoreTestSupport::resetInternalsObject):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r99384 r99386  
     12011-11-06  Adam Barth  <abarth@webkit.org>
     2
     3        Don't crash when a context hasn't been created.  This fixed a
     4        testing-only crash on the bots in the Chromium port.
     5
     6        * testing/v8/WebCoreTestSupport.cpp:
     7        (WebCoreTestSupport::resetInternalsObject):
     8
    192011-11-06  Darin Adler  <darin@apple.com>
    210
  • trunk/Source/WebCore/testing/v8/WebCoreTestSupport.cpp

    r95901 r99386  
    4848void resetInternalsObject(v8::Local<v8::Context> context)
    4949{
     50    // This can happen if JavaScript is disabled in the main frame.
     51    if (context.IsEmpty())
     52        return;
     53
    5054    v8::Context::Scope contextScope(context);
    5155    v8::HandleScope scope;
    5256
    5357    v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(v8::String::New(Internals::internalsId)));
    54     Internals * internals = V8Internals::toNative(object);
     58    Internals* internals = V8Internals::toNative(object);
    5559    if (internals) {
    5660        ScriptExecutionContext* scriptContext = getScriptExecutionContext();
Note: See TracChangeset for help on using the changeset viewer.