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

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

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoader Client); 624 RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoader Client);
625 frame->setView(FrameView::create(frame.get())); 625 frame->setView(FrameView::create(frame.get()));
626 frame->init(); 626 frame->init();
627 FrameLoader* loader = frame->loader(); 627 FrameLoader* loader = frame->loader();
628 frame->view()->setCanHaveScrollbars(false); 628 frame->view()->setCanHaveScrollbars(false);
629 frame->view()->setTransparent(true); 629 frame->view()->setTransparent(true);
630 ASSERT(loader->activeDocumentLoader()); 630 ASSERT(loader->activeDocumentLoader());
631 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("text/ html", "UTF-8"); 631 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("text/ html", "UTF-8");
632 writer->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), si zeof(InspectorOverlayPage_html)); 632 writer->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), si zeof(InspectorOverlayPage_html));
633 loader->activeDocumentLoader()->endWriting(writer); 633 loader->activeDocumentLoader()->endWriting(writer);
634 v8::HandleScope handleScope; 634 v8::Isolate* isolate = frame->script()->isolate();
635 v8::HandleScope handleScope(isolate);
635 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext( ); 636 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext( );
636 v8::Context::Scope contextScope(frameContext); 637 v8::Context::Scope contextScope(frameContext);
637 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle< v8::Object>(), frameContext->GetIsolate()); 638 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle< v8::Object>(), isolate);
638 v8::Handle<v8::Object> global = frameContext->Global(); 639 v8::Handle<v8::Object> global = frameContext->Global();
639 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); 640 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj);
640 641
641 #if OS(WINDOWS) 642 #if OS(WINDOWS)
642 evaluateInOverlay("setPlatform", "windows"); 643 evaluateInOverlay("setPlatform", "windows");
643 #elif OS(DARWIN) 644 #elif OS(DARWIN)
644 evaluateInOverlay("setPlatform", "mac"); 645 evaluateInOverlay("setPlatform", "mac");
645 #elif OS(UNIX) 646 #elif OS(UNIX)
646 evaluateInOverlay("setPlatform", "linux"); 647 evaluateInOverlay("setPlatform", "linux");
647 #endif 648 #endif
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 691 }
691 692
692 void InspectorOverlay::freePage() 693 void InspectorOverlay::freePage()
693 { 694 {
694 m_overlayPage.clear(); 695 m_overlayPage.clear();
695 m_overlayChromeClient.clear(); 696 m_overlayChromeClient.clear();
696 m_timer.stop(); 697 m_timer.stop();
697 } 698 }
698 699
699 } // namespace WebCore 700 } // namespace WebCore
700
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorIndexedDBAgent.cpp ('k') | Source/core/inspector/ScriptProfile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698