Commit 4c6e4080 authored by beidson@apple.com's avatar beidson@apple.com

2009-04-13 Brady Eidson <beidson@apple.com>

        Reviewed by Tim Hatcher

        Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
        useful to developers/users.

        * WebView/WebFrame.mm:
        (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
          perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
        (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
          is more meaningful.
        (-[WebFrame loadHTMLString:baseURL:]): Ditto.
        (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.



git-svn-id: svn://svn.chromium.org/blink/trunk@42451 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent aca29a25
2009-04-13 Brady Eidson <beidson@apple.com>
Reviewed by Tim Hatcher
Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
useful to developers/users.
* WebView/WebFrame.mm:
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
(-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
is more meaningful.
(-[WebFrame loadHTMLString:baseURL:]): Ditto.
(-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
2009-04-13 Brady Eidson <beidson@apple.com>
Reviewed by Kevin Decker
......
......@@ -1316,10 +1316,8 @@ static NSURL *createUniqueWebDataURL()
- (void)_loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL unreachableURL:(NSURL *)unreachableURL
{
if (!pthread_main_np()) {
WebCoreThreadViolationCheckRoundTwo();
if (!pthread_main_np())
return [[self _webkit_invokeOnMainThread] _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:unreachableURL];
}
KURL responseURL;
if (!baseURL) {
......@@ -1340,6 +1338,8 @@ static NSURL *createUniqueWebDataURL()
- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL
{
WebCoreThreadViolationCheckRoundTwo();
if (!MIMEType)
MIMEType = @"text/html";
[self _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:nil];
......@@ -1353,11 +1353,15 @@ static NSURL *createUniqueWebDataURL()
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
{
WebCoreThreadViolationCheckRoundTwo();
[self _loadHTMLString:string baseURL:baseURL unreachableURL:nil];
}
- (void)loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL
{
WebCoreThreadViolationCheckRoundTwo();
[self _loadHTMLString:string baseURL:baseURL unreachableURL:unreachableURL];
}
......
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