| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 m_pendingFrameLoads.remove(it); | 684 m_pendingFrameLoads.remove(it); |
| 685 | 685 |
| 686 [webFrame _setInternalLoadDelegate:nil]; | 686 [webFrame _setInternalLoadDelegate:nil]; |
| 687 } | 687 } |
| 688 | 688 |
| 689 void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginReques
t) | 689 void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginReques
t) |
| 690 { | 690 { |
| 691 NSURL *URL = [pluginRequest->request() URL]; | 691 NSURL *URL = [pluginRequest->request() URL]; |
| 692 NSString *JSString = [URL _webkit_scriptIfJavaScriptURL]; | 692 NSString *JSString = [URL _webkit_scriptIfJavaScriptURL]; |
| 693 ASSERT(JSString); | 693 ASSERT(JSString); |
| 694 | 694 |
| 695 RefPtr<NetscapePluginInstanceProxy> protect(this); // Executing arbitrary Ja
vaScript can destroy the proxy. |
| 696 |
| 695 NSString *result = [[m_pluginView webFrame] _stringByEvaluatingJavaScriptFro
mString:JSString forceUserGesture:pluginRequest->allowPopups()]; | 697 NSString *result = [[m_pluginView webFrame] _stringByEvaluatingJavaScriptFro
mString:JSString forceUserGesture:pluginRequest->allowPopups()]; |
| 696 | 698 |
| 697 // Don't continue if stringByEvaluatingJavaScriptFromString caused the plug-
in to stop. | 699 // Don't continue if stringByEvaluatingJavaScriptFromString caused the plug-
in to stop. |
| 698 if (!m_pluginHostProxy) | 700 if (!m_pluginHostProxy) |
| 699 return; | 701 return; |
| 700 | 702 |
| 701 if (pluginRequest->frameName() != nil) | 703 if (pluginRequest->frameName() != nil) |
| 702 return; | 704 return; |
| 703 | 705 |
| 704 if ([result length] > 0) { | 706 if ([result length] > 0) { |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 JSLock lock(SilenceAssertionsOnly); | 1676 JSLock lock(SilenceAssertionsOnly); |
| 1675 throwError(exec, createError(exec, stringToUString(globalExceptionString
()))); | 1677 throwError(exec, createError(exec, stringToUString(globalExceptionString
()))); |
| 1676 } | 1678 } |
| 1677 | 1679 |
| 1678 globalExceptionString() = String(); | 1680 globalExceptionString() = String(); |
| 1679 } | 1681 } |
| 1680 | 1682 |
| 1681 } // namespace WebKit | 1683 } // namespace WebKit |
| 1682 | 1684 |
| 1683 #endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API) | 1685 #endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API) |
| OLD | NEW |