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

Side by Side Diff: Source/bindings/core/v8/custom/V8HTMLDocumentCustom.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 namespace blink { 50 namespace blink {
51 51
52 // HTMLDocument ---------------------------------------------------------------- 52 // HTMLDocument ----------------------------------------------------------------
53 53
54 void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) 54 void V8HTMLDocument::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
55 { 55 {
56 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); 56 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder());
57 57
58 if (info.Length() > 2) { 58 if (info.Length() > 2) {
59 if (RefPtr<LocalFrame> frame = htmlDocument->frame()) { 59 if (RefPtrWillBeRawPtr<LocalFrame> frame = htmlDocument->frame()) {
60 // Fetch the global object for the frame. 60 // Fetch the global object for the frame.
61 v8::Local<v8::Context> context = toV8Context(frame.get(), DOMWrapper World::current(info.GetIsolate())); 61 v8::Local<v8::Context> context = toV8Context(frame.get(), DOMWrapper World::current(info.GetIsolate()));
62 // Bail out if we cannot get the context. 62 // Bail out if we cannot get the context.
63 if (context.IsEmpty()) 63 if (context.IsEmpty())
64 return; 64 return;
65 v8::Local<v8::Object> global = context->Global(); 65 v8::Local<v8::Object> global = context->Global();
66 // Get the open property of the global object. 66 // Get the open property of the global object.
67 v8::Local<v8::Value> function = global->Get(v8AtomicString(info.GetI solate(), "open")); 67 v8::Local<v8::Value> function = global->Get(v8AtomicString(info.GetI solate(), "open"));
68 // Failed; return without throwing (new) exception. 68 // Failed; return without throwing (new) exception.
69 if (function.IsEmpty()) 69 if (function.IsEmpty())
(...skipping 15 matching lines...) Expand all
85 85
86 ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Doc ument", info.Holder(), info.GetIsolate()); 86 ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Doc ument", info.Holder(), info.GetIsolate());
87 htmlDocument->open(callingDOMWindow(info.GetIsolate())->document(), exceptio nState); 87 htmlDocument->open(callingDOMWindow(info.GetIsolate())->document(), exceptio nState);
88 if (exceptionState.throwIfNeeded()) 88 if (exceptionState.throwIfNeeded())
89 return; 89 return;
90 90
91 v8SetReturnValue(info, info.Holder()); 91 v8SetReturnValue(info, info.Holder());
92 } 92 }
93 93
94 } // namespace blink 94 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698