Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: Source/web/WebPluginContainerImpl.cpp

Issue 326853002: Revert of Add an ASSERT about cross-world wrapper leakage into ScriptValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 if (!frame) 430 if (!frame)
431 return WebString(); 431 return WebString();
432 432
433 const KURL& kurl = url; 433 const KURL& kurl = url;
434 ASSERT(kurl.protocolIs("javascript")); 434 ASSERT(kurl.protocolIs("javascript"));
435 435
436 String script = decodeURLEscapeSequences( 436 String script = decodeURLEscapeSequences(
437 kurl.string().substring(strlen("javascript:"))); 437 kurl.string().substring(strlen("javascript:")));
438 438
439 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingNe wUserGesture : PossiblyProcessingUserGesture); 439 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingNe wUserGesture : PossiblyProcessingUserGesture);
440 v8::HandleScope handleScope(toIsolate(frame)); 440 ScriptValue result = frame->script().executeScriptInMainWorldAndReturnValue( ScriptSourceCode(script));
441 v8::Local<v8::Value> result = frame->script().executeScriptInMainWorldAndRet urnValue(ScriptSourceCode(script));
442 441
443 // Failure is reported as a null string. 442 // Failure is reported as a null string.
444 if (result.IsEmpty() || !result->IsString()) 443 String resultString;
445 return WebString(); 444 result.toString(resultString);
446 return toCoreString(v8::Handle<v8::String>::Cast(result)); 445 return resultString;
447 } 446 }
448 447
449 void WebPluginContainerImpl::loadFrameRequest(const WebURLRequest& request, cons t WebString& target, bool notifyNeeded, void* notifyData) 448 void WebPluginContainerImpl::loadFrameRequest(const WebURLRequest& request, cons t WebString& target, bool notifyNeeded, void* notifyData)
450 { 449 {
451 LocalFrame* frame = m_element->document().frame(); 450 LocalFrame* frame = m_element->document().frame();
452 if (!frame || !frame->loader().documentLoader()) 451 if (!frame || !frame->loader().documentLoader())
453 return; // FIXME: send a notification in this case? 452 return; // FIXME: send a notification in this case?
454 453
455 if (notifyNeeded) { 454 if (notifyNeeded) {
456 // FIXME: This is a bit of hack to allow us to observe completion of 455 // FIXME: This is a bit of hack to allow us to observe completion of
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 895
897 return clipRect; 896 return clipRect;
898 } 897 }
899 898
900 bool WebPluginContainerImpl::pluginShouldPersist() const 899 bool WebPluginContainerImpl::pluginShouldPersist() const
901 { 900 {
902 return m_webPlugin->shouldPersist(); 901 return m_webPlugin->shouldPersist();
903 } 902 }
904 903
905 } // namespace blink 904 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698