| Index: webkit/glue/webframe_impl.cc
|
| ===================================================================
|
| --- webkit/glue/webframe_impl.cc (revision 20764)
|
| +++ webkit/glue/webframe_impl.cc (working copy)
|
| @@ -1604,12 +1604,23 @@
|
| sources_in[i].startLine));
|
| }
|
|
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kIsolatedWorld))
|
| - frame_->script()->evaluateInNewWorld(sources);
|
| - else
|
| - frame_->script()->evaluateInNewContext(sources);
|
| + frame_->script()->evaluateInNewContext(sources);
|
| }
|
|
|
| +void WebFrameImpl::ExecuteScriptInNewWorld(
|
| + const WebScriptSource* sources_in, int num_sources) {
|
| + Vector<WebCore::ScriptSourceCode> sources;
|
| +
|
| + for (int i = 0; i < num_sources; ++i) {
|
| + sources.append(WebCore::ScriptSourceCode(
|
| + webkit_glue::WebStringToString(sources_in[i].code),
|
| + webkit_glue::WebURLToKURL(sources_in[i].url),
|
| + sources_in[i].startLine));
|
| + }
|
| +
|
| + frame_->script()->evaluateInNewWorld(sources);
|
| +}
|
| +
|
| std::wstring WebFrameImpl::GetName() {
|
| return webkit_glue::StringToStdWString(frame_->tree()->name());
|
| }
|
|
|