Changeset 130093 in webkit


Ignore:
Timestamp:
Oct 1, 2012, 4:12:27 PM (13 years ago)
Author:
rniwa@webkit.org
Message:

Build fix. Clearly, these objects could be instantiated in worker threads.
Not sure why my patch asserted that we're in the main thread.

  • dom/ContainerNode.h:

(WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
(WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130091 r130093  
     12012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Build fix. Clearly, these objects could be instantiated in worker threads.
     4        Not sure why my patch asserted that we're in the main thread.
     5
     6        * dom/ContainerNode.h:
     7        (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
     8        (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
     9
    1102012-10-01  Beth Dakin  <bdakin@apple.com>
    211
  • trunk/Source/WebCore/dom/ContainerNode.h

    r130084 r130093  
    4646    NoEventDispatchAssertion()
    4747    {
    48         ASSERT(isMainThread());
     48        if (!isMainThread())
     49            return;
    4950#ifndef NDEBUG
    5051        s_count++;
     
    5455    ~NoEventDispatchAssertion()
    5556    {
    56         ASSERT(isMainThread());
     57        if (!isMainThread())
     58            return;
    5759        ASSERT(s_count);
    5860#ifndef NDEBUG
     
    6264
    6365#ifndef NDEBUG
    64     static bool isEventDispatchForbidden() { return s_count; }
     66    static bool isEventDispatchForbidden()
     67    {
     68        if (!isMainThread())
     69            return false;
     70        return s_count;
     71    }
    6572#endif
    6673
Note: See TracChangeset for help on using the changeset viewer.