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

Side by Side Diff: Source/web/WebBlob.cpp

Issue 1166793006: bindings: Stop using the given creationContext in public APIs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « Source/web/WebArrayBufferConverter.cpp ('k') | Source/web/WebDOMError.cpp » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 m_private = other.m_private; 72 m_private = other.m_private;
73 } 73 }
74 74
75 WebString WebBlob::uuid() 75 WebString WebBlob::uuid()
76 { 76 {
77 if (!m_private.get()) 77 if (!m_private.get())
78 return WebString(); 78 return WebString();
79 return m_private->uuid(); 79 return m_private->uuid();
80 } 80 }
81 81
82 v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> creationContext, v 8::Isolate* isolate) 82 v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> /* creationContext */, v8::Isolate* isolate)
83 { 83 {
84 // We no longer use |creationContext| because it's often misused and points
85 // to a context faked by user script.
84 if (!m_private.get()) 86 if (!m_private.get())
85 return v8::Local<v8::Value>(); 87 return v8::Local<v8::Value>();
86 return toV8(m_private.get(), creationContext, isolate); 88 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate );
87 } 89 }
88 90
89 WebBlob::WebBlob(Blob* blob) 91 WebBlob::WebBlob(Blob* blob)
90 : m_private(blob) 92 : m_private(blob)
91 { 93 {
92 } 94 }
93 95
94 WebBlob& WebBlob::operator=(Blob* blob) 96 WebBlob& WebBlob::operator=(Blob* blob)
95 { 97 {
96 m_private = blob; 98 m_private = blob;
97 return *this; 99 return *this;
98 } 100 }
99 101
100 } // namespace blink 102 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebArrayBufferConverter.cpp ('k') | Source/web/WebDOMError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698