@ -62,7 +62,7 @@ using v8::Value;
url . flags | = URL_FLAGS_TERMINATED ; \
url . flags | = URL_FLAGS_TERMINATED ; \
goto done ; \
goto done ; \
}
}
# define FAILED() \
# define URL_ FAILED() \
{ \
{ \
url . flags | = URL_FLAGS_FAILED ; \
url . flags | = URL_FLAGS_FAILED ; \
goto done ; \
goto done ; \
@ -744,7 +744,7 @@ namespace url {
break ;
break ;
case kNoScheme :
case kNoScheme :
if ( ! has_base | | ( IS_CANNOT_BE_BASE ( base . flags ) & & ch ! = ' # ' ) ) {
if ( ! has_base | | ( IS_CANNOT_BE_BASE ( base . flags ) & & ch ! = ' # ' ) ) {
FAILED ( )
URL_ FAILED( )
} else if ( IS_CANNOT_BE_BASE ( base . flags ) & & ch = = ' # ' ) {
} else if ( IS_CANNOT_BE_BASE ( base . flags ) & & ch = = ' # ' ) {
SET_HAVE_SCHEME ( )
SET_HAVE_SCHEME ( )
url . scheme = base . scheme ;
url . scheme = base . scheme ;
@ -982,10 +982,10 @@ namespace url {
case kHostname :
case kHostname :
if ( ch = = ' : ' & & ! sbflag ) {
if ( ch = = ' : ' & & ! sbflag ) {
if ( special & & buffer . size ( ) = = 0 )
if ( special & & buffer . size ( ) = = 0 )
FAILED ( )
URL_ FAILED( )
SET_HAVE_HOST ( )
SET_HAVE_HOST ( )
if ( ParseHost ( & buffer , & url . host ) < 0 )
if ( ParseHost ( & buffer , & url . host ) < 0 )
FAILED ( )
URL_ FAILED( )
buffer . clear ( ) ;
buffer . clear ( ) ;
state = kPort ;
state = kPort ;
if ( override = = kHostname )
if ( override = = kHostname )
@ -997,10 +997,10 @@ namespace url {
special_back_slash ) {
special_back_slash ) {
p - - ;
p - - ;
if ( special & & buffer . size ( ) = = 0 )
if ( special & & buffer . size ( ) = = 0 )
FAILED ( )
URL_ FAILED( )
SET_HAVE_HOST ( )
SET_HAVE_HOST ( )
if ( ParseHost ( & buffer , & url . host ) < 0 )
if ( ParseHost ( & buffer , & url . host ) < 0 )
FAILED ( )
URL_ FAILED( )
buffer . clear ( ) ;
buffer . clear ( ) ;
state = kPathStart ;
state = kPathStart ;
if ( state_override )
if ( state_override )
@ -1029,14 +1029,14 @@ namespace url {
if ( port > = 0 & & port < = 0xffff ) {
if ( port > = 0 & & port < = 0xffff ) {
url . port = NormalizePort ( url . scheme , port ) ;
url . port = NormalizePort ( url . scheme , port ) ;
} else if ( ! state_override ) {
} else if ( ! state_override ) {
FAILED ( )
URL_ FAILED( )
}
}
buffer . clear ( ) ;
buffer . clear ( ) ;
}
}
state = kPathStart ;
state = kPathStart ;
continue ;
continue ;
} else {
} else {
FAILED ( ) ;
URL_ FAILED( ) ;
}
}
break ;
break ;
case kFile :
case kFile :
@ -1151,7 +1151,7 @@ namespace url {
if ( buffer ! = " localhost " ) {
if ( buffer ! = " localhost " ) {
SET_HAVE_HOST ( )
SET_HAVE_HOST ( )
if ( ParseHost ( & buffer , & url . host ) < 0 )
if ( ParseHost ( & buffer , & url . host ) < 0 )
FAILED ( )
URL_ FAILED( )
}
}
buffer . clear ( ) ;
buffer . clear ( ) ;
state = kPathStart ;
state = kPathStart ;
@ -1294,7 +1294,7 @@ namespace url {
argv [ ARG_PATH ] = Copy ( isolate , url . path ) ;
argv [ ARG_PATH ] = Copy ( isolate , url . path ) ;
}
}
cb - > Call ( context , recv , 9 , argv ) ;
( void ) cb - > Call ( context , recv , 9 , argv ) ;
}
}
static void Parse ( const FunctionCallbackInfo < Value > & args ) {
static void Parse ( const FunctionCallbackInfo < Value > & args ) {