summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 03:20:05 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 03:20:05 +0000
commit0bceb6c00f1177923efc41903de625ccc33d4428 (patch)
treee7c709bb819843d00f11dd32ae85ed5172a0ee3e /webkit/glue/webframe_impl.cc
parentd4cafafac04f16475b30346609c21dca6a8906d0 (diff)
downloadchromium_src-0bceb6c00f1177923efc41903de625ccc33d4428.zip
chromium_src-0bceb6c00f1177923efc41903de625ccc33d4428.tar.gz
chromium_src-0bceb6c00f1177923efc41903de625ccc33d4428.tar.bz2
Run content scripts in their own isolated world. Hidden behind the --isolated-world command line argument to let us iterate on this feature.R=aaBUG=12218TEST=None :( (I have a testing plan we can put in place once the upstream half of this CL lands.)
Review URL: http://codereview.chromium.org/118188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 98e0afb..98c9b16 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -131,7 +131,9 @@ MSVC_POP_WARNING();
#undef LOG
+#include "base/base_switches.h"
#include "base/basictypes.h"
+#include "base/command_line.h"
#include "base/gfx/rect.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -1692,7 +1694,10 @@ void WebFrameImpl::ExecuteScriptInNewContext(
sources_in[i].startLine));
}
- frame_->script()->evaluateInNewContext(sources);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kIsolatedWorld))
+ frame_->script()->evaluateInNewWorld(sources);
+ else
+ frame_->script()->evaluateInNewContext(sources);
}
std::wstring WebFrameImpl::GetName() {