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

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

Issue 1027593003: bindings: Use Maybe version of v8::String::NewFromUtf8() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()-> loadResource("InspectorOverlayPage.html"); 345 const blink::WebData& overlayPageHTMLResource = blink::Platform::current()-> loadResource("InspectorOverlayPage.html");
346 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat a(), overlayPageHTMLResource.size()); 346 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat a(), overlayPageHTMLResource.size());
347 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad))); 347 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html" , "UTF-8", KURL(), ForceSynchronousLoad)));
348 v8::Isolate* isolate = toIsolate(frame.get()); 348 v8::Isolate* isolate = toIsolate(frame.get());
349 ScriptState* scriptState = ScriptState::forMainWorld(frame.get()); 349 ScriptState* scriptState = ScriptState::forMainWorld(frame.get());
350 ASSERT(scriptState->contextIsValid()); 350 ASSERT(scriptState->contextIsValid());
351 ScriptState::Scope scope(scriptState); 351 ScriptState::Scope scope(scriptState);
352 v8::Local<v8::Object> global = scriptState->context()->Global(); 352 v8::Local<v8::Object> global = scriptState->context()->Global();
353 v8::Local<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, isol ate); 353 v8::Local<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), global, isol ate);
354 global->Set(v8::String::NewFromUtf8(isolate, "InspectorOverlayHost"), overla yHostObj); 354 global->Set(v8AtomicString(isolate, "InspectorOverlayHost"), overlayHostObj) ;
355 355
356 #if OS(WIN) 356 #if OS(WIN)
357 evaluateInOverlay("setPlatform", "windows"); 357 evaluateInOverlay("setPlatform", "windows");
358 #elif OS(MACOSX) 358 #elif OS(MACOSX)
359 evaluateInOverlay("setPlatform", "mac"); 359 evaluateInOverlay("setPlatform", "mac");
360 #elif OS(POSIX) 360 #elif OS(POSIX)
361 evaluateInOverlay("setPlatform", "linux"); 361 evaluateInOverlay("setPlatform", "linux");
362 #endif 362 #endif
363 363
364 return m_overlayPage.get(); 364 return m_overlayPage.get();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if (!m_suspendCount++) 436 if (!m_suspendCount++)
437 clear(); 437 clear();
438 } 438 }
439 439
440 void InspectorOverlayImpl::resumeUpdates() 440 void InspectorOverlayImpl::resumeUpdates()
441 { 441 {
442 --m_suspendCount; 442 --m_suspendCount;
443 } 443 }
444 444
445 } // namespace blink 445 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698