Index: webkit/glue/webframe_impl.cc |
=================================================================== |
--- webkit/glue/webframe_impl.cc (revision 18892) |
+++ webkit/glue/webframe_impl.cc (working copy) |
@@ -131,7 +131,9 @@ |
#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" |
@@ -1695,7 +1697,10 @@ |
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() { |