зеркало из https://github.com/mozilla/pjs.git
Make GetImplementationFlags more useful/extensible by changing the default implementation to return zero rather than returning the flags from the shared buffer handle, and add a constant for one expected future use. b=109571 r=jag sr=scc
This commit is contained in:
Родитель
21c9673687
Коммит
0e16f4fafd
|
@ -114,8 +114,15 @@ class NS_COM nsAString
|
||||||
// nsAString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
// nsAString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
||||||
virtual ~nsAString() { } // ...yes, I expect to be sub-classed
|
virtual ~nsAString() { } // ...yes, I expect to be sub-classed
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kHasStackBuffer = 0x00000001 // Has and is using a buffer on
|
||||||
|
// the stack (that could be copied
|
||||||
|
// to the heap if
|
||||||
|
// GetSharedBufferHandle() is
|
||||||
|
// called).
|
||||||
|
};
|
||||||
virtual PRUint32 GetImplementationFlags() const;
|
virtual PRUint32 GetImplementationFlags() const;
|
||||||
|
|
||||||
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
||||||
virtual const buffer_handle_type* GetBufferHandle() const;
|
virtual const buffer_handle_type* GetBufferHandle() const;
|
||||||
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
||||||
|
@ -358,8 +365,15 @@ class NS_COM nsACString
|
||||||
// nsACString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
// nsACString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
||||||
virtual ~nsACString() { } // ...yes, I expect to be sub-classed
|
virtual ~nsACString() { } // ...yes, I expect to be sub-classed
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kHasStackBuffer = 0x00000001 // Has and is using a buffer on
|
||||||
|
// the stack (that could be copied
|
||||||
|
// to the heap if
|
||||||
|
// GetSharedBufferHandle() is
|
||||||
|
// called).
|
||||||
|
};
|
||||||
virtual PRUint32 GetImplementationFlags() const;
|
virtual PRUint32 GetImplementationFlags() const;
|
||||||
|
|
||||||
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
||||||
virtual const buffer_handle_type* GetBufferHandle() const;
|
virtual const buffer_handle_type* GetBufferHandle() const;
|
||||||
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
||||||
|
|
|
@ -106,11 +106,7 @@ nsAString::GetBufferHandle() const
|
||||||
PRUint32
|
PRUint32
|
||||||
nsAString::GetImplementationFlags() const
|
nsAString::GetImplementationFlags() const
|
||||||
{
|
{
|
||||||
PRUint32 flags = 0;
|
return 0;
|
||||||
const shared_buffer_handle_type* handle = GetSharedBufferHandle();
|
|
||||||
if ( handle )
|
|
||||||
flags = handle->GetImplementationFlags();
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -605,11 +601,7 @@ nsACString::GetBufferHandle() const
|
||||||
PRUint32
|
PRUint32
|
||||||
nsACString::GetImplementationFlags() const
|
nsACString::GetImplementationFlags() const
|
||||||
{
|
{
|
||||||
PRUint32 flags = 0;
|
return 0;
|
||||||
const shared_buffer_handle_type* handle = GetSharedBufferHandle();
|
|
||||||
if ( handle )
|
|
||||||
flags = handle->GetImplementationFlags();
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,8 +114,15 @@ class NS_COM nsAString
|
||||||
// nsAString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
// nsAString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
||||||
virtual ~nsAString() { } // ...yes, I expect to be sub-classed
|
virtual ~nsAString() { } // ...yes, I expect to be sub-classed
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kHasStackBuffer = 0x00000001 // Has and is using a buffer on
|
||||||
|
// the stack (that could be copied
|
||||||
|
// to the heap if
|
||||||
|
// GetSharedBufferHandle() is
|
||||||
|
// called).
|
||||||
|
};
|
||||||
virtual PRUint32 GetImplementationFlags() const;
|
virtual PRUint32 GetImplementationFlags() const;
|
||||||
|
|
||||||
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
||||||
virtual const buffer_handle_type* GetBufferHandle() const;
|
virtual const buffer_handle_type* GetBufferHandle() const;
|
||||||
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
||||||
|
@ -358,8 +365,15 @@ class NS_COM nsACString
|
||||||
// nsACString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
// nsACString( const self_type& ); // auto-generated copy-constructor OK (again, only because we're abstract)
|
||||||
virtual ~nsACString() { } // ...yes, I expect to be sub-classed
|
virtual ~nsACString() { } // ...yes, I expect to be sub-classed
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kHasStackBuffer = 0x00000001 // Has and is using a buffer on
|
||||||
|
// the stack (that could be copied
|
||||||
|
// to the heap if
|
||||||
|
// GetSharedBufferHandle() is
|
||||||
|
// called).
|
||||||
|
};
|
||||||
virtual PRUint32 GetImplementationFlags() const;
|
virtual PRUint32 GetImplementationFlags() const;
|
||||||
|
|
||||||
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
virtual const buffer_handle_type* GetFlatBufferHandle() const;
|
||||||
virtual const buffer_handle_type* GetBufferHandle() const;
|
virtual const buffer_handle_type* GetBufferHandle() const;
|
||||||
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
virtual const shared_buffer_handle_type* GetSharedBufferHandle() const;
|
||||||
|
|
|
@ -106,11 +106,7 @@ nsAString::GetBufferHandle() const
|
||||||
PRUint32
|
PRUint32
|
||||||
nsAString::GetImplementationFlags() const
|
nsAString::GetImplementationFlags() const
|
||||||
{
|
{
|
||||||
PRUint32 flags = 0;
|
return 0;
|
||||||
const shared_buffer_handle_type* handle = GetSharedBufferHandle();
|
|
||||||
if ( handle )
|
|
||||||
flags = handle->GetImplementationFlags();
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -605,11 +601,7 @@ nsACString::GetBufferHandle() const
|
||||||
PRUint32
|
PRUint32
|
||||||
nsACString::GetImplementationFlags() const
|
nsACString::GetImplementationFlags() const
|
||||||
{
|
{
|
||||||
PRUint32 flags = 0;
|
return 0;
|
||||||
const shared_buffer_handle_type* handle = GetSharedBufferHandle();
|
|
||||||
if ( handle )
|
|
||||||
flags = handle->GetImplementationFlags();
|
|
||||||
return flags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче