diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 18:37:13 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 18:37:13 +0000 |
commit | 59d1aacf35db435aa3c5ec0c17a582392627e7a9 (patch) | |
tree | 525512e161de0460b6b354edc87b050e354750c6 | |
parent | cc2c217e71a89436aa017f7927dda21d3de71c1d (diff) | |
download | chromium_src-59d1aacf35db435aa3c5ec0c17a582392627e7a9.zip chromium_src-59d1aacf35db435aa3c5ec0c17a582392627e7a9.tar.gz chromium_src-59d1aacf35db435aa3c5ec0c17a582392627e7a9.tar.bz2 |
Revert 49984 - patch from issue 2762014
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/2835007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50000 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | app/surface/transport_dib_mac.cc | 4 | ||||
-rw-r--r-- | base/mach_ipc_mac.h | 7 | ||||
-rw-r--r-- | base/scoped_nsobject.h | 35 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | 3 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_text_field_mac.mm | 8 | ||||
-rw-r--r-- | chrome/browser/chrome_browser_application_mac.mm | 14 | ||||
-rw-r--r-- | chrome/browser/cocoa/authorization_util.mm | 3 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_helper.cc | 6 | ||||
-rw-r--r-- | libjingle.patch | 36 | ||||
-rw-r--r-- | webcore.patch | 184 |
10 files changed, 25 insertions, 275 deletions
diff --git a/app/surface/transport_dib_mac.cc b/app/surface/transport_dib_mac.cc index f17835f..ef1d242 100644 --- a/app/surface/transport_dib_mac.cc +++ b/app/surface/transport_dib_mac.cc @@ -8,7 +8,6 @@ #include <sys/stat.h> #include "base/eintr_wrapper.h" -#include "base/logging.h" #include "base/scoped_ptr.h" #include "base/shared_memory.h" #include "skia/ext/platform_canvas.h" @@ -48,8 +47,7 @@ TransportDIB* TransportDIB::Map(TransportDIB::Handle handle) { if ((fstat(handle.fd, &st) != 0) || (!dib->shared_memory_.Map(st.st_size))) { delete dib; - if (HANDLE_EINTR(close(handle.fd)) < 0) - PLOG(ERROR) << "close"; + HANDLE_EINTR(close(handle.fd)); return NULL; } diff --git a/base/mach_ipc_mac.h b/base/mach_ipc_mac.h index 13fc5f4..1e88279 100644 --- a/base/mach_ipc_mac.h +++ b/base/mach_ipc_mac.h @@ -115,10 +115,9 @@ class MachMsgPortDescriptor : public mach_msg_port_descriptor_t { // We're just a simple wrapper for mach_msg_port_descriptor_t // and have the same memory layout -// FIXME - //operator mach_msg_port_descriptor_t&() { - //return *this; - //} + operator mach_msg_port_descriptor_t&() { + return *this; + } // For convenience operator mach_port_t() const { diff --git a/base/scoped_nsobject.h b/base/scoped_nsobject.h index 7e544c9..bde2753 100644 --- a/base/scoped_nsobject.h +++ b/base/scoped_nsobject.h @@ -48,8 +48,13 @@ class scoped_nsobject { object_ = object; } - bool operator==(NST* that) const { return object_ == that; } - bool operator!=(NST* that) const { return object_ != that; } + bool operator==(NST* that) const { + return object_ == that; + } + + bool operator!=(NST* that) const { + return object_ != that; + } operator NST*() const { return object_; @@ -80,23 +85,6 @@ class scoped_nsobject { DISALLOW_COPY_AND_ASSIGN(scoped_nsobject); }; -// Free functions -template <class C> -void swap(scoped_nsobject<C>& p1, scoped_nsobject<C>& p2) { - p1.swap(p2); -} - -template <class C> -bool operator==(C* p1, const scoped_nsobject<C>& p2) { - return p1 == p2.get(); -} - -template <class C> -bool operator!=(C* p1, const scoped_nsobject<C>& p2) { - return p1 != p2.get(); -} - - // Specialization to make scoped_nsobject<id> work. template<> class scoped_nsobject<id> { @@ -121,8 +109,13 @@ class scoped_nsobject<id> { object_ = object; } - bool operator==(id that) const { return object_ == that; } - bool operator!=(id that) const { return object_ != that; } + bool operator==(id that) const { + return object_ == that; + } + + bool operator!=(id that) const { + return object_ != that; + } operator id() const { return object_; diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index cb4145aa..b565e98 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -878,8 +878,7 @@ void AutocompleteEditViewMac::FocusLocation(bool select_all) { // call it if this behavior is desired. if (select_all || ![field_ currentEditor]) [[field_ window] makeFirstResponder:field_]; -// FIXME - DCHECK_EQ((id)[field_ currentEditor], (id)[[field_ window] firstResponder]); + DCHECK_EQ([field_ currentEditor], [[field_ window] firstResponder]); } } diff --git a/chrome/browser/autofill/autofill_text_field_mac.mm b/chrome/browser/autofill/autofill_text_field_mac.mm index 9860f4a..ff5b1a0 100644 --- a/chrome/browser/autofill/autofill_text_field_mac.mm +++ b/chrome/browser/autofill/autofill_text_field_mac.mm @@ -28,12 +28,10 @@ return becoming; } -- (void)setObjectValue:(id<NSCopying>)object { -// FIXME - if (isCreditCardField_ && - [(NSObject*)object isKindOfClass:[NSString class]]) { +- (void)setObjectValue:(id)object { + if (isCreditCardField_ && [object isKindOfClass:[NSString class]]) { // Obfuscate the number. - NSString* string = (NSString*)object; // FIXME: NSMutableCopying + NSString* string = object; CreditCard card; card.SetInfo(AutoFillType(CREDIT_CARD_NUMBER), base::SysNSStringToUTF16(string)); diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm index 979fd2b..f696e96 100644 --- a/chrome/browser/chrome_browser_application_mac.mm +++ b/chrome/browser/chrome_browser_application_mac.mm @@ -85,11 +85,7 @@ size_t BinForException(NSException* exception) { // A list of common known exceptions. The list position will // determine where they live in the histogram, so never move them // around, only add to the end. -<<<<<<< HEAD static NSString* const kKnownNSExceptionNames[] = { -======= - static NSString* kKnownNSExceptionNames[] = { ->>>>>>> more // ??? NSGenericException, @@ -280,11 +276,7 @@ BOOL SwizzleNSExceptionInit() { // When a Cocoa control is wired to a freed object, we get crashers // in the call to |super| with no useful information in the // backtrace. Attempt to add some useful information. -<<<<<<< HEAD static NSString* const kActionKey = @"sendaction"; -======= - static NSString* kActionKey = @"sendaction"; ->>>>>>> more // If the action is something generic like -commandDispatch:, then // the tag is essential. @@ -326,15 +318,9 @@ BOOL SwizzleNSExceptionInit() { // is tracked because it may be the one which caused the system to // go off the rails. The last exception thrown is tracked because // it may be the one most directly associated with the crash. -<<<<<<< HEAD static NSString* const kFirstExceptionKey = @"firstexception"; static BOOL trackedFirstException = NO; static NSString* const kLastExceptionKey = @"lastexception"; -======= - static NSString* kFirstExceptionKey = @"firstexception"; - static BOOL trackedFirstException = NO; - static NSString* kLastExceptionKey = @"lastexception"; ->>>>>>> more // TODO(shess): It would be useful to post some stacktrace info // from the exception. diff --git a/chrome/browser/cocoa/authorization_util.mm b/chrome/browser/cocoa/authorization_util.mm index 6eb0f84..a879db2 100644 --- a/chrome/browser/cocoa/authorization_util.mm +++ b/chrome/browser/cocoa/authorization_util.mm @@ -47,8 +47,7 @@ AuthorizationRef AuthorizationCreateToRunAsRoot(CFStringRef prompt) { // The OS will append " Type an administrator's name and password to allow // <CFBundleDisplayName> to make changes." -//FIXME - NSString* prompt_ns = (NSString*)prompt; + NSString* prompt_ns = reinterpret_cast<const NSString*>(prompt); const char* prompt_c = [prompt_ns UTF8String]; size_t prompt_length = prompt_c ? strlen(prompt_c) : 0; diff --git a/chrome/browser/renderer_host/render_widget_helper.cc b/chrome/browser/renderer_host/render_widget_helper.cc index e2cd531..baa8045 100644 --- a/chrome/browser/renderer_host/render_widget_helper.cc +++ b/chrome/browser/renderer_host/render_widget_helper.cc @@ -296,8 +296,7 @@ void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) { i = allocated_dibs_.find(dib_id); if (i != allocated_dibs_.end()) { - if (HANDLE_EINTR(close(i->second)) < 0) - PLOG(ERROR) << "close"; + HANDLE_EINTR(close(i->second)); allocated_dibs_.erase(i); } else { DLOG(WARNING) << "Renderer asked us to free unknown transport DIB"; @@ -307,8 +306,7 @@ void RenderWidgetHelper::FreeTransportDIB(TransportDIB::Id dib_id) { void RenderWidgetHelper::ClearAllocatedDIBs() { for (std::map<TransportDIB::Id, int>::iterator i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { - if (HANDLE_EINTR(close(i->second)) < 0) - PLOG(ERROR) << "close: " << i->first; + HANDLE_EINTR(close(i->second)); } allocated_dibs_.clear(); diff --git a/libjingle.patch b/libjingle.patch deleted file mode 100644 index 537e376..0000000 --- a/libjingle.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: talk/base/stringutils.h -=================================================================== ---- talk/base/stringutils.h (revision 21) -+++ talk/base/stringutils.h (working copy) -@@ -225,15 +225,6 @@ - GCC_ATTR(format(printf,3,4)); - */ - template<class CTYPE> --size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) { -- va_list args; -- va_start(args, format); -- size_t len = vsprintfn(buffer, buflen, format, args); -- va_end(args); -- return len; --} -- --template<class CTYPE> - size_t vsprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, - va_list args) { - int len = vsnprintf(buffer, buflen, format, args); -@@ -244,6 +235,15 @@ - return len; - } - -+template<class CTYPE> -+size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) { -+ va_list args; -+ va_start(args, format); -+ size_t len = vsprintfn(buffer, buflen, format, args); -+ va_end(args); -+ return len; -+} -+ - /////////////////////////////////////////////////////////////////////////////// - // Allow safe comparing and copying ascii (not UTF-8) with both wide and - // non-wide character strings. diff --git a/webcore.patch b/webcore.patch deleted file mode 100644 index ea8f61e..0000000 --- a/webcore.patch +++ /dev/null @@ -1,184 +0,0 @@ -Index: storage/StorageNamespaceImpl.cpp -=================================================================== ---- storage/StorageNamespaceImpl.cpp (revision 60900) -+++ storage/StorageNamespaceImpl.cpp (working copy) -@@ -108,7 +108,7 @@ - - RefPtr<SecurityOrigin> origin = prpOrigin; - RefPtr<StorageAreaImpl> storageArea; -- if (storageArea = m_storageAreaMap.get(origin)) -+ if ((storageArea = m_storageAreaMap.get(origin))) - return storageArea.release(); - - storageArea = StorageAreaImpl::create(m_storageType, origin, m_syncManager, m_quota); -Index: page/animation/AnimationBase.h -=================================================================== ---- page/animation/AnimationBase.h (revision 60900) -+++ page/animation/AnimationBase.h (working copy) -@@ -42,7 +42,7 @@ - class Node; - class RenderObject; - class RenderStyle; --class TimingFunction; -+struct TimingFunction; - - class AnimationBase : public RefCounted<AnimationBase> { - friend class CompositeAnimation; -Index: platform/graphics/mac/FontPlatformData.h -=================================================================== ---- platform/graphics/mac/FontPlatformData.h (revision 60900) -+++ platform/graphics/mac/FontPlatformData.h (working copy) -@@ -51,7 +51,8 @@ - inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef>(nsFont); } - #endif - --struct FontPlatformData { -+class FontPlatformData { // FIXME -+ public: - FontPlatformData(float size, bool syntheticBold, bool syntheticOblique) - : m_syntheticBold(syntheticBold) - , m_syntheticOblique(syntheticOblique) -Index: platform/graphics/BitmapImage.h -=================================================================== ---- platform/graphics/BitmapImage.h (revision 60900) -+++ platform/graphics/BitmapImage.h (working copy) -@@ -57,7 +57,7 @@ - // invoking our constructor or destructor. This allows us to have a vector even for a struct - // that's not copyable. - namespace WTF { -- template<> class VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits {}; -+ template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits {}; - } - - namespace WebCore { -Index: accessibility/AccessibilityTableCell.cpp -=================================================================== ---- accessibility/AccessibilityTableCell.cpp (revision 60900) -+++ accessibility/AccessibilityTableCell.cpp (working copy) -@@ -71,7 +71,7 @@ - AccessibilityObject* AccessibilityTableCell::parentTable() const - { - if (!m_renderer || !m_renderer->isTableCell()) -- return false; -+ return NULL; - - return axObjectCache()->getOrCreate(toRenderTableCell(m_renderer)->table()); - } -Index: accessibility/AccessibilityRenderObject.cpp -=================================================================== ---- accessibility/AccessibilityRenderObject.cpp (revision 60900) -+++ accessibility/AccessibilityRenderObject.cpp (working copy) -@@ -1255,11 +1255,11 @@ - HTMLLabelElement* AccessibilityRenderObject::labelElementContainer() const - { - if (!m_renderer) -- return false; -+ return NULL; - - // the control element should not be considered part of the label - if (isControl()) -- return false; -+ return NULL; - - // find if this has a parent that is a label - for (Node* parentNode = m_renderer->node(); parentNode; parentNode = parentNode->parentNode()) { -Index: bindings/v8/NPV8Object.cpp -=================================================================== ---- bindings/v8/NPV8Object.cpp (revision 60900) -+++ bindings/v8/NPV8Object.cpp (working copy) -@@ -58,7 +58,7 @@ - - WrapperTypeInfo* npObjectTypeInfo() - { -- static WrapperTypeInfo typeInfo = { 0, 0, false }; -+ static WrapperTypeInfo typeInfo = { 0, 0, NULL }; - return &typeInfo; - } - -Index: bindings/v8/custom/V8HTMLOptionElementConstructor.cpp -=================================================================== ---- bindings/v8/custom/V8HTMLOptionElementConstructor.cpp (revision 60900) -+++ bindings/v8/custom/V8HTMLOptionElementConstructor.cpp (working copy) -@@ -44,7 +44,7 @@ - - namespace WebCore { - --WrapperTypeInfo V8HTMLOptionElementConstructor::info = { V8HTMLOptionElementConstructor::GetTemplate, 0, false }; -+WrapperTypeInfo V8HTMLOptionElementConstructor::info = { V8HTMLOptionElementConstructor::GetTemplate, 0, NULL }; - - static v8::Handle<v8::Value> v8HTMLOptionElementConstructorCallback(const v8::Arguments& args) - { -Index: html/HTMLFormElement.cpp -=================================================================== ---- html/HTMLFormElement.cpp (revision 60900) -+++ html/HTMLFormElement.cpp (working copy) -@@ -648,7 +648,7 @@ - - // see if we have seen something with this name before - RefPtr<HTMLFormControlElement> aliasElem; -- if (aliasElem = elementForAlias(name)) { -+ if ((aliasElem = elementForAlias(name))) { - bool found = false; - for (unsigned n = 0; n < namedItems.size(); n++) { - if (namedItems[n] == aliasElem.get()) { -Index: inspector/InspectorValues.cpp -=================================================================== ---- inspector/InspectorValues.cpp (revision 60900) -+++ inspector/InspectorValues.cpp (working copy) -@@ -599,7 +599,7 @@ - { - PassRefPtr<InspectorValue> value = get(name); - if (!value) -- return false; -+ return 0; - return value->asObject(); - } - -@@ -607,7 +607,7 @@ - { - PassRefPtr<InspectorValue> value = get(name); - if (!value) -- return false; -+ return 0; - return value->asArray(); - } - -Index: rendering/RootInlineBox.cpp -=================================================================== ---- rendering/RootInlineBox.cpp (revision 60900) -+++ rendering/RootInlineBox.cpp (working copy) -@@ -411,7 +411,7 @@ - EllipsisBox* RootInlineBox::ellipsisBox() const - { - if (!m_hasEllipsisBox) -- return false; -+ return NULL; - return gEllipsisBoxMap->get(this); - } - -Index: rendering/RenderBlock.h -=================================================================== ---- rendering/RenderBlock.h (revision 60900) -+++ rendering/RenderBlock.h (working copy) -@@ -38,7 +38,7 @@ - struct BidiRun; - - template <class Iterator, class Run> class BidiResolver; --template <class Iterator> class MidpointState; -+template <class Iterator> struct MidpointState; - typedef BidiResolver<InlineIterator, BidiRun> InlineBidiResolver; - typedef MidpointState<InlineIterator> LineMidpointState; - -Index: css/CSSStyleSheet.h -=================================================================== ---- css/CSSStyleSheet.h (revision 60900) -+++ css/CSSStyleSheet.h (working copy) -@@ -26,7 +26,7 @@ - - namespace WebCore { - --class CSSNamespace; -+struct CSSNamespace; - class CSSParser; - class CSSRule; - class DocLoader; |