Skip to content
  • adele's avatar
    WebCore: · cc025d83
    adele authored
            Reviewed by Kevin M.
    
            WebCore part of fix for <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
    
            * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
            Convert return value to a string.  This matches the behavior in Safari 2.0.
    
    WebKit:
    
            Reviewed by Kevin M.
    
            WebKit part of fix for <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
    
            Added an app specific workaround for VitalSource Bookshelf that strips "return" from the beginning of their script strings.  We used to allow this
            but now we throw a JavaScript exception for return statements that aren't in functions.
    
            Filed this evangelism bug so we can notify VitalSource of the problem:
            <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
    
            * WebView/WebView.mm: (-[WebView stringByEvaluatingJavaScriptFromString:]):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cc025d83