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

Side by Side Diff: Source/bindings/v8/ScriptController.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 v8::Local<v8::Context> v8Context = m_windowShell->context(); 311 v8::Local<v8::Context> v8Context = m_windowShell->context();
312 v8Context->AllowCodeGenerationFromStrings(false); 312 v8Context->AllowCodeGenerationFromStrings(false);
313 v8Context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, e rrorMessage)); 313 v8Context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, e rrorMessage));
314 } 314 }
315 315
316 PassRefPtr<SharedPersistent<v8::Object> > ScriptController::createPluginWrapper( Widget* widget) 316 PassRefPtr<SharedPersistent<v8::Object> > ScriptController::createPluginWrapper( Widget* widget)
317 { 317 {
318 ASSERT(widget); 318 ASSERT(widget);
319 319
320 if (!widget->isPluginView()) 320 if (!widget->isPluginView())
321 return 0; 321 return nullptr;
322 322
323 NPObject* npObject = toPluginView(widget)->scriptableObject(); 323 NPObject* npObject = toPluginView(widget)->scriptableObject();
324 if (!npObject) 324 if (!npObject)
325 return 0; 325 return nullptr;
326 326
327 // Frame Memory Management for NPObjects 327 // Frame Memory Management for NPObjects
328 // ------------------------------------- 328 // -------------------------------------
329 // NPObjects are treated differently than other objects wrapped by JS. 329 // NPObjects are treated differently than other objects wrapped by JS.
330 // NPObjects can be created either by the browser (e.g. the main 330 // NPObjects can be created either by the browser (e.g. the main
331 // window object) or by the plugin (the main plugin object 331 // window object) or by the plugin (the main plugin object
332 // for a HTMLEmbedElement). Further, unlike most DOM Objects, the frame 332 // for a HTMLEmbedElement). Further, unlike most DOM Objects, the frame
333 // is especially careful to ensure NPObjects terminate at frame teardown bec ause 333 // is especially careful to ensure NPObjects terminate at frame teardown bec ause
334 // if a plugin leaks a reference, it could leak its objects (or the browser' s objects). 334 // if a plugin leaks a reference, it could leak its objects (or the browser' s objects).
335 // 335 //
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 v8Results = evaluateHandleScope.Escape(resultArray); 651 v8Results = evaluateHandleScope.Escape(resultArray);
652 } 652 }
653 653
654 if (results && !v8Results.IsEmpty()) { 654 if (results && !v8Results.IsEmpty()) {
655 for (size_t i = 0; i < v8Results->Length(); ++i) 655 for (size_t i = 0; i < v8Results->Length(); ++i)
656 results->append(ScriptValue(v8Results->Get(i), m_isolate)); 656 results->append(ScriptValue(v8Results->Get(i), m_isolate));
657 } 657 }
658 } 658 }
659 659
660 } // namespace WebCore 660 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptCallStackFactory.cpp ('k') | Source/bindings/v8/ScriptEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698