Changeset 196395 in webkit


Ignore:
Timestamp:
Feb 10, 2016 2:16:58 PM (8 years ago)
Author:
mark.lam@apple.com
Message:

WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture: should assert that it is being called from the "main" thread.
https://bugs.webkit.org/show_bug.cgi?id=154059

Reviewed by Geoffrey Garen.

This makes it so that misbehaving clients which call it (indirectly) from another
thread (not the main thread) will fail faster. Otherwise, we get potential
memory corruption that results in strange crashes elsewhere later.

  • WebView/WebFrame.mm:

(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):

Location:
trunk/Source/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r196328 r196395  
     12016-02-10  Mark Lam  <mark.lam@apple.com>
     2
     3        WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture: should assert that it is being called from the "main" thread.
     4        https://bugs.webkit.org/show_bug.cgi?id=154059
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        This makes it so that misbehaving clients which call it (indirectly) from another
     9        thread (not the main thread) will fail faster.  Otherwise, we get potential
     10        memory corruption that results in strange crashes elsewhere later.
     11
     12        * WebView/WebFrame.mm:
     13        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
     14
    1152016-02-04  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebKit/mac/WebView/WebFrame.mm

    r194496 r196395  
    671671        return @"";
    672672
     673    RELEASE_ASSERT(isMainThread());
     674
    673675    ASSERT(_private->coreFrame->document());
    674676    RetainPtr<WebFrame> protect(self); // Executing arbitrary JavaScript can destroy the frame.
Note: See TracChangeset for help on using the changeset viewer.