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

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

Issue 301663002: Fix toV8 with empty context in InspectorOverlay::overlayPage() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | 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) 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 frame->view()->setCanHaveScrollbars(false); 719 frame->view()->setCanHaveScrollbars(false);
720 frame->view()->setTransparent(true); 720 frame->view()->setTransparent(true);
721 721
722 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char *>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html)); 722 RefPtr<SharedBuffer> data = SharedBuffer::create(reinterpret_cast<const char *>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
723 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad))); 723 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad)));
724 v8::Isolate* isolate = toIsolate(frame.get()); 724 v8::Isolate* isolate = toIsolate(frame.get());
725 v8::HandleScope handleScope(isolate); 725 v8::HandleScope handleScope(isolate);
726 v8::Handle<v8::Context> frameContext = toV8Context(isolate, frame.get(), DOM WrapperWorld::mainWorld()); 726 v8::Handle<v8::Context> frameContext = toV8Context(isolate, frame.get(), DOM WrapperWorld::mainWorld());
727 ASSERT(!frameContext.IsEmpty()); 727 ASSERT(!frameContext.IsEmpty());
728 v8::Context::Scope contextScope(frameContext); 728 v8::Context::Scope contextScope(frameContext);
729 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle< v8::Object>(), isolate);
730 v8::Handle<v8::Object> global = frameContext->Global(); 729 v8::Handle<v8::Object> global = frameContext->Global();
730 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, iso late);
731 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj); 731 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj);
732 732
733 #if OS(WIN) 733 #if OS(WIN)
734 evaluateInOverlay("setPlatform", "windows"); 734 evaluateInOverlay("setPlatform", "windows");
735 #elif OS(MACOSX) 735 #elif OS(MACOSX)
736 evaluateInOverlay("setPlatform", "mac"); 736 evaluateInOverlay("setPlatform", "mac");
737 #elif OS(POSIX) 737 #elif OS(POSIX)
738 evaluateInOverlay("setPlatform", "linux"); 738 evaluateInOverlay("setPlatform", "linux");
739 #endif 739 #endif
740 740
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 hideHighlight(); 797 hideHighlight();
798 } 798 }
799 799
800 void InspectorOverlay::startedRecordingProfile() 800 void InspectorOverlay::startedRecordingProfile()
801 { 801 {
802 if (!m_activeProfilerCount++) 802 if (!m_activeProfilerCount++)
803 freePage(); 803 freePage();
804 } 804 }
805 805
806 } // namespace WebCore 806 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698