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

Side by Side Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 622333002: Flip the true/false result of ScriptState::contextIsValid (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 frame->init(); 738 frame->init();
739 FrameLoader& loader = frame->loader(); 739 FrameLoader& loader = frame->loader();
740 frame->view()->setCanHaveScrollbars(false); 740 frame->view()->setCanHaveScrollbars(false);
741 frame->view()->setTransparent(true); 741 frame->view()->setTransparent(true);
742 742
743 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()-> loadResource("InspectorOverlayPage.html"); 743 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()-> loadResource("InspectorOverlayPage.html");
744 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat a(), overlayPageHTMLResource.size()); 744 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat a(), overlayPageHTMLResource.size());
745 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad))); 745 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad)));
746 v8::Isolate* isolate = toIsolate(frame.get()); 746 v8::Isolate* isolate = toIsolate(frame.get());
747 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); 747 ScriptState* scriptState = ScriptState::forMainWorld(frame.get());
748 ASSERT(!scriptState->contextIsValid()); 748 ASSERT(scriptState->contextIsValid());
749 ScriptState::Scope scope(scriptState); 749 ScriptState::Scope scope(scriptState);
750 v8::Handle<v8::Object> global = scriptState->context()->Global(); 750 v8::Handle<v8::Object> global = scriptState->context()->Global();
751 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso late); 751 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso late);
752 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj); 752 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj);
753 753
754 #if OS(WIN) 754 #if OS(WIN)
755 evaluateInOverlay("setPlatform", "windows"); 755 evaluateInOverlay("setPlatform", "windows");
756 #elif OS(MACOSX) 756 #elif OS(MACOSX)
757 evaluateInOverlay("setPlatform", "mac"); 757 evaluateInOverlay("setPlatform", "mac");
758 #elif OS(POSIX) 758 #elif OS(POSIX)
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 hideHighlight(); 846 hideHighlight();
847 } 847 }
848 848
849 void InspectorOverlay::startedRecordingProfile() 849 void InspectorOverlay::startedRecordingProfile()
850 { 850 {
851 if (!m_activeProfilerCount++) 851 if (!m_activeProfilerCount++)
852 freePage(); 852 freePage();
853 } 853 }
854 854
855 } // namespace blink 855 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestCallbackInterface.cpp ('k') | Source/core/inspector/PageRuntimeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698