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

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

Issue 17063016: Remove leak of objects between isolated worlds on custom events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minor rebase nits. Created 7 years, 5 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
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/bindings/v8/V8HiddenPropertyName.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 ASSERT(m_isolate == v8::Isolate::GetCurrent()); 103 ASSERT(m_isolate == v8::Isolate::GetCurrent());
104 v8::Handle<v8::String> v8Key = v8String(key, m_isolate); 104 v8::Handle<v8::String> v8Key = v8String(key, m_isolate);
105 if (!options->Has(v8Key)) 105 if (!options->Has(v8Key))
106 return false; 106 return false;
107 value = options->Get(v8Key); 107 value = options->Get(v8Key);
108 if (value.IsEmpty()) 108 if (value.IsEmpty())
109 return false; 109 return false;
110 return true; 110 return true;
111 } 111 }
112 112
113 bool Dictionary::get(const String& key, v8::Local<v8::Value>& value) const
114 {
115 return getKey(key, value);
116 }
117
113 bool Dictionary::get(const String& key, bool& value) const 118 bool Dictionary::get(const String& key, bool& value) const
114 { 119 {
115 v8::Local<v8::Value> v8Value; 120 v8::Local<v8::Value> v8Value;
116 if (!getKey(key, v8Value)) 121 if (!getKey(key, v8Value))
117 return false; 122 return false;
118 123
119 v8::Local<v8::Boolean> v8Bool = v8Value->ToBoolean(); 124 v8::Local<v8::Boolean> v8Bool = v8Value->ToBoolean();
120 if (v8Bool.IsEmpty()) 125 if (v8Bool.IsEmpty())
121 return false; 126 return false;
122 value = v8Bool->Value(); 127 value = v8Bool->Value();
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 v8::Local<v8::String> key = properties->Get(i)->ToString(); 599 v8::Local<v8::String> key = properties->Get(i)->ToString();
595 if (!options->Has(key)) 600 if (!options->Has(key))
596 continue; 601 continue;
597 names.append(toWebCoreString(key)); 602 names.append(toWebCoreString(key));
598 } 603 }
599 604
600 return true; 605 return true;
601 } 606 }
602 607
603 } // namespace WebCore 608 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/bindings/v8/V8HiddenPropertyName.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698