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

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

Issue 318023002: Oilpan: Prepare to make ExecutionContext GarbageCollectedMixin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Source/core/dom/Document.h » ('j') | Source/core/dom/ExecutionContext.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ASSERT(!tryCatch.HasCaught()); 149 ASSERT(!tryCatch.HasCaught());
150 ASSERT(m_wrapperType); 150 ASSERT(m_wrapperType);
151 tagName = QualifiedName(nullAtom, localName, namespaceURI); 151 tagName = QualifiedName(nullAtom, localName, namespaceURI);
152 return m_wrapperType; 152 return m_wrapperType;
153 } 153 }
154 154
155 PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::cre ateCallbacks() 155 PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::cre ateCallbacks()
156 { 156 {
157 ASSERT(!m_prototype.IsEmpty()); 157 ASSERT(!m_prototype.IsEmpty());
158 158
159 RefPtr<ExecutionContext> executionContext = m_scriptState->executionContext( );
160
161 v8::TryCatch exceptionCatcher; 159 v8::TryCatch exceptionCatcher;
162 exceptionCatcher.SetVerbose(true); 160 exceptionCatcher.SetVerbose(true);
163 161
164 v8::Isolate* isolate = m_scriptState->isolate(); 162 v8::Isolate* isolate = m_scriptState->isolate();
165 v8::Handle<v8::Function> created = retrieveCallback(isolate, "createdCallbac k"); 163 v8::Handle<v8::Function> created = retrieveCallback(isolate, "createdCallbac k");
166 v8::Handle<v8::Function> attached = retrieveCallback(isolate, "attachedCallb ack"); 164 v8::Handle<v8::Function> attached = retrieveCallback(isolate, "attachedCallb ack");
167 v8::Handle<v8::Function> detached = retrieveCallback(isolate, "detachedCallb ack"); 165 v8::Handle<v8::Function> detached = retrieveCallback(isolate, "detachedCallb ack");
168 v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attri buteChangedCallback"); 166 v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attri buteChangedCallback");
169 167
170 m_callbacks = V8CustomElementLifecycleCallbacks::create(m_scriptState.get(), m_prototype, created, attached, detached, attributeChanged); 168 m_callbacks = V8CustomElementLifecycleCallbacks::create(m_scriptState.get(), m_prototype, created, attached, detached, attributeChanged);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 #if ENABLE(OILPAN) 300 #if ENABLE(OILPAN)
303 // FIXME: Oilpan: We don't have RawPtr<Eement> version of 301 // FIXME: Oilpan: We don't have RawPtr<Eement> version of
304 // v8SetReturnValueFast until Node.idl has WillBeGarbageCollected. 302 // v8SetReturnValueFast until Node.idl has WillBeGarbageCollected.
305 v8SetReturnValueFast(info, element.get(), document); 303 v8SetReturnValueFast(info, element.get(), document);
306 #else 304 #else
307 v8SetReturnValueFast(info, element.release(), document); 305 v8SetReturnValueFast(info, element.release(), document);
308 #endif 306 #endif
309 } 307 }
310 308
311 } // namespace WebCore 309 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.h » ('j') | Source/core/dom/ExecutionContext.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698