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

Side by Side Diff: Source/bindings/dart/DartDOMData.cpp

Issue 23895004: Keep a persistent handle for the bindings classes to avoid repeated lookups that involve performing… (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: get custom ids from generated table, allocate table ahead of time 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 24 matching lines...) Expand all
35 #include "bindings/dart/ThreadSafeDartIsolateWrapper.h" 35 #include "bindings/dart/ThreadSafeDartIsolateWrapper.h"
36 #include "core/dom/ScriptExecutionContext.h" 36 #include "core/dom/ScriptExecutionContext.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 DartDOMData::DartDOMData(ScriptExecutionContext* context, bool isDOMEnabled) 40 DartDOMData::DartDOMData(ScriptExecutionContext* context, bool isDOMEnabled)
41 : m_scriptExecutionContext(context) 41 : m_scriptExecutionContext(context)
42 , m_isDOMEnabled(isDOMEnabled) 42 , m_isDOMEnabled(isDOMEnabled)
43 , m_recursion(0) 43 , m_recursion(0)
44 , m_stringCache() 44 , m_stringCache()
45 , m_classHandleCache()
45 { 46 {
46 } 47 }
47 48
48 DartDOMData::~DartDOMData() 49 DartDOMData::~DartDOMData()
49 { 50 {
50 ASSERT(m_nodeMap.isEmpty()); 51 ASSERT(m_nodeMap.isEmpty());
51 ASSERT(m_objectMap.isEmpty()); 52 ASSERT(m_objectMap.isEmpty());
52 ASSERT(m_messagePortMap.isEmpty()); 53 ASSERT(m_messagePortMap.isEmpty());
53 ASSERT(m_activeObjectMap.isEmpty()); 54 ASSERT(m_activeObjectMap.isEmpty());
54 } 55 }
(...skipping 24 matching lines...) Expand all
79 } 80 }
80 81
81 PassRefPtr<ThreadSafeDartIsolateWrapper> DartDOMData::threadSafeIsolateWrapper() 82 PassRefPtr<ThreadSafeDartIsolateWrapper> DartDOMData::threadSafeIsolateWrapper()
82 { 83 {
83 ASSERT(m_threadSafeIsolateWrapper); 84 ASSERT(m_threadSafeIsolateWrapper);
84 MutexLocker locker(m_isolateWrapperMutex); 85 MutexLocker locker(m_isolateWrapperMutex);
85 return m_threadSafeIsolateWrapper; 86 return m_threadSafeIsolateWrapper;
86 } 87 }
87 88
88 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698