Title: [120141] branches/safari-536-branch
- Revision
- 120141
- Author
- [email protected]
- Date
- 2012-06-12 17:04:10 -0700 (Tue, 12 Jun 2012)
Log Message
Merged r119280 -> <rdar://problem/11620927>
Modified Paths
Diff
Modified: branches/safari-536-branch/Source/WebKit/mac/ChangeLog (120140 => 120141)
--- branches/safari-536-branch/Source/WebKit/mac/ChangeLog 2012-06-13 00:01:58 UTC (rev 120140)
+++ branches/safari-536-branch/Source/WebKit/mac/ChangeLog 2012-06-13 00:04:10 UTC (rev 120141)
@@ -1,5 +1,22 @@
2012-06-12 Lucas Forschler <[email protected]>
+ Merge 119280
+
+ 2012-06-01 Michael Saboff <[email protected]>
+
+ WebFrame::_stringByEvaluatingJavaScriptFromString methods don't handle nil string
+ https://bugs.webkit.org/show_bug.cgi?id=88109
+
+ Reviewed by Geoffrey Garen.
+
+ Added short circuit return when the NSString to evaluate is nil.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
+
+2012-06-12 Lucas Forschler <[email protected]>
+
Merge 119543
2012-06-05 Anders Carlsson <[email protected]>
Modified: branches/safari-536-branch/Source/WebKit/mac/WebView/WebFrame.mm (120140 => 120141)
--- branches/safari-536-branch/Source/WebKit/mac/WebView/WebFrame.mm 2012-06-13 00:01:58 UTC (rev 120140)
+++ branches/safari-536-branch/Source/WebKit/mac/WebView/WebFrame.mm 2012-06-13 00:04:10 UTC (rev 120141)
@@ -594,6 +594,9 @@
- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string forceUserGesture:(BOOL)forceUserGesture
{
+ if (!string)
+ return @"";
+
ASSERT(_private->coreFrame->document());
RetainPtr<WebFrame> protect(self); // Executing arbitrary _javascript_ can destroy the frame.
@@ -1133,6 +1136,9 @@
- (NSString *)_stringByEvaluatingJavaScriptFromString:(NSString *)string withGlobalObject:(JSObjectRef)globalObjectRef inScriptWorld:(WebScriptWorld *)world
{
+ if (!string)
+ return @"";
+
// Start off with some guess at a frame and a global object, we'll try to do better...!
JSDOMWindow* anyWorldGlobalObject = _private->coreFrame->script()->globalObject(mainThreadNormalWorld());
Modified: branches/safari-536-branch/Tools/ChangeLog (120140 => 120141)
--- branches/safari-536-branch/Tools/ChangeLog 2012-06-13 00:01:58 UTC (rev 120140)
+++ branches/safari-536-branch/Tools/ChangeLog 2012-06-13 00:04:10 UTC (rev 120141)
@@ -1,3 +1,19 @@
+2012-06-12 Lucas Forschler <[email protected]>
+
+ Merge 119280
+
+ 2012-06-01 Michael Saboff <[email protected]>
+
+ WebFrame::_stringByEvaluatingJavaScriptFromString methods don't handle nil string
+ https://bugs.webkit.org/show_bug.cgi?id=88109
+
+ Reviewed by Geoffrey Garen.
+
+ Additional test case.
+
+ * TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm:
+ (TestWebKitAPI::TEST):
+
2012-05-31 Ojan Vafai <[email protected]>
add back the ability to disable flexbox
Modified: branches/safari-536-branch/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm (120140 => 120141)
--- branches/safari-536-branch/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm 2012-06-13 00:01:58 UTC (rev 120140)
+++ branches/safari-536-branch/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm 2012-06-13 00:04:10 UTC (rev 120141)
@@ -55,6 +55,10 @@
RetainPtr<WebView> webView (AdoptNS, [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]);
+ // Test a nil string
+ NSString *result = [webView.get() stringByEvaluatingJavaScriptFromString:nil];
+ EXPECT_WK_STREQ(@"", result);
+
for (id _expression_ in expressions.get()) {
NSString *expectedResult = [expressions.get() objectForKey:_expression_];
NSString *result = [webView.get() stringByEvaluatingJavaScriptFromString:_expression_];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes